This is a study to tell to exactly what do u mean by a hacker.
Let's start with two of the most famous and trustworthy definitions ever found.
This one is from Wikipedia (More about it later, its a story in itself) :
A hacker is a person who creates and modifies computer software and computer hardware, including computer programming, administration, and security-related items.
In computer programming, a 'hacker' is a programmer who hacks or reaches a goal by employing a series of modifications to exploit or extend existing code or resources.
In computer security, a hacker is a person able to exploit a system or gain unauthorized access through skill and tactics. This usually refers to a black hat hacker. There are also white hats (ethical hackers), and grey hats.
In other technical fields, hacker is extended to mean a person who makes things work beyond perceived limits through their own technical skill,such as a hardware hacker, or reality hacker.
This one is from "How To Become A Hacker" Eric Steven Raymond (One of the best place to learn how to be a hacker) :
There is a community, a shared culture, of expert programmers and networking wizards that traces its history back through decades to the first time-sharing minicomputers and the earliest ARPAnet experiments. The members of this culture originated the term ‘hacker’. Hackers built the Internet. Hackers made the Unix operating system what it is today. Hackers run Usenet. Hackers make the World Wide Web work. If you are part of this culture, if you have contributed to it and other people in it know who you are and call you a hacker, you're a hacker.
I think this would be more than enough for you to know what is a hacker. However as every study has a conclusion I conclude by stating that a hacker is anyone who has got the zeal to pursue knowledge and has got the guts to give it all away. The best example (according to me) being Linus Torvalds.