It means “a samurai (Japanese wrestler, or fighter?? in old times) headding to the west.”
But the meaning is not important at all.
Actually, this sentence is used for remembering which month doesn’t have 31 days.
に=2 Febuary: 28or29
し=4 April: 30
む=6 June: 30
く=9 September: 30
さむらい=士(in kanji)=十一(separated 士)=11: November: 30
And the other months all have 31 days.