By and large, Hacker is roughly used as a reference to a creative, capable programmer. "Programmer" here is to be understood in the wider sense; it would apply to a DBA with intricate understanding of his DataBase just the same, f.ex. In fact, the term applies to anyone with expertise in any kind of technical field: someone who designs and builds a custom turbo charger for his car's engine is a highly respectable car Hacker.
A "hack" is any kind of minimalistic solution or lateral thinking approach to a problem. That might be a quick and dirty patchwork that works anyhow, or an elegant solution that is much simpler than the "ordinary" one. "Hack value" is a term used to describe just how creative or ingenious a solution is; sometimes, Hackers will do things with little or no practical use simply because they have great hack value.
Hackers are not people who just break into computers. Most of those who do so are ScriptKiddies and Crackers, not Hackers. Crackers, unlike ScriptKiddies, actually understand how breaking into computers works, but acquire this knowledge as a means to accomplish their goals rather than a primary interest. A real Hacker on the other hand may crack services or computers as well, but will usually be doing so in pursuit of better understanding or in an attempt to prove something. Still, the whole story about the noble and sublime Hacker ethic is often exaggerated and overemphasized. Hackers are no more inherently saintly than anyone else. The difference between Hackers and Crackers/ScriptKiddies in attacking systems is mostly merely in that the Hacker is driven by curiosity. However, a transgression out of curiosity is still a trangression, no less so than one committed out of malice. The real difference is that the definition of Hacker is much broader than that of Cracker or ScriptKiddie; many a Hacker has never even attempted to break into any system or service.