Rangers are human fighters who patrol the wilderness protecting the civilized lands from the encroachment of evil humanoids. They are skilled in woodcraft, scouting and tracking. When a ranger reaches higher level, they learn to cast spells taken from a subset of both the cleric and magic-user lists.
I rolled up a Ranger as my first character when I bought the Advanced Dungeons & Dragons (AD&D) player's handbook back in 1984. I was a big fan of Ralph Bakshi's animated Lord of the Rings film and wanted a character like Strider. These days I've come back to preferring the rules Basic & Expert (B/X) Dungeons and Dragons, but there are some features in AD&D I'd like to use, including the Ranger. It's interesting that when you strip out the more verbose language from AD&D the actual rules required for a Ranger are a lot less than you'd think and fit quite nicely into the format for B/X.
In later editions they made the Ranger more of an Archer, or a duel sword wielding character based on the Drizzt novels. I prefer the original concept though, which was closer to Tolkien's Rangers. Warriors who travel the wilderness hunting bands of marauding humanoids in order to keep them from crossing over into their home kingdoms. The extra hit dice at first level and bonus to damage for melee combat against humanoids also make them a great choice for small (or solo) 1st level adventures.