A nerd is unusually smart, esp. in math, science, and/or computers. He or she tends to know a lot about pop culture, yet, ironically, often doesn't have great social skills. Usually has a great sarcastic, witty sense of humor (deriving from the knowledge of pop culture). Well-rounded, but just can't express him/herself to non-nerdy people well.
Seth Cohen on "The O.C." (the best example)
Shia LaBoeuf's character in "Transformers"
The "I'm a Mac" guy in "Live Free or Die Hard"
Geek, dork, and dweeb, on the other hand, tend to have negative connotations.
See also metanerd
Guy 2: I think the women are tired of jerks and want someone who'll treat them nice and take care of them.
Guy 1: Yeah. So you want to get wasted and treat women like meaningless objects?
Guy 2: Yeah! Let's go!
Often mistaken for Geeks, who aspire to become nerds, yet lack the intelligence, and end up giving nerds a bad name due to their poor social skills.
Non-nerds are often scared of nerds, due to their detailed knowledge, and therefore seemingly high levels of intelligence - and subsequently denegrate them as much as possible as often as possible.
Nerds exist covertly within the fabric of society, often choosing to 'nerd it up' in private or in the company of fellow nerds. It is for this reason they are feared the most - unlike geeks, who are easily identified, nerds can only be found out when casual conversation reaches a subject that they like nerding.
Nerd: "Let's bash this nerd"
Nerd: "That'll teach you to go playing with my tesla coil"