Friday in this riddle is the name of a conveyance: a horse, car, motorcycle, etc.—anything that can be ridden.
The other clue word in the phrasing of the question is “on.” The riddle could be worded “came into town on,” “arrived in town on,” or even “went to town on.”
Since we pair “ride” and “on” in English, the riddle will work with anything that can be sat on and ridden. Traditionally, the answer is that the man’s horse is named Friday. While Friday is an unusual name, it is not unheard of. Other examples of English names that refer to more than one thing include April, May, and Robin.
Also, the length of time the cowboy (or man, or woman) stays in the town can vary to anything short of a week (if the cowboy stayed one week, it would be Friday again, so he would of course leave on a Friday).