A loner is someone who prefers being alone to spending time with other people. If you're a loner, you'd rather take a walk in the woods by yourself than go to a party.
An extreme kind of loner is a hermit, a person who lives far from society, completely alone, and doesn't interact with anyone. Other loners are simply introverts, people who often need a break from socializing and enjoy spending time on their own. Loner seems to have appeared in the 1940s, originally in "Life" magazine's description of baseball player Ted Williams as "something of a loner (who) refuses to pal around with his teammates."