As
Boromir says, Eorl made an oath to Cirion to fight for Gondor in times of need. In return he and his people were given the land of Calenardhon to dwell in, which became Rohan.
As for the people who assailed the Gondorians - this is purely speculative on my part - they may have been dissidents related to the Rohirrim and perhaps related to the Dunlendings. I don't have the books on me now but the best answer I can give you is that the Rohirrim weren't descended from Hador himself; thus it's a bit ambiguous and therefore, no descendants of Hador himself assailed the Gondorians. However, those who followed Hador and lived among his folk were the forefathers of the Rohirrim, so while the followers of Hador may have attacked the Gondorians, his actual
House (those who were directly descended from him) did not, as far as I know.
I've expressed this in a bit of a muddled way, but hopefully you get the gist of what I'm saying
.