The cowboys rode into a nameless town.

Literal

Cowboys [topic-は] horse [by-で] name-[also-も]-exist-not town [into-に] entered-[went-ていった].

A literary/narrative sentence. 牧童 ('cowboy, herder') is a somewhat archaic/literary compound. 馬で ('by horse') uses the instrumental で for means of transport. 名もない ('nameless, no-name') is a set expression using も after a noun to mean 'not even [a name]' — 'doesn't even have a name.' 入っていった combines 入る ('enter') with ていく (go away, past tense). 名もない functions as an adjectival modifier attached directly to 町.