According to Whatis.com, nerds are people of above-average intelligence who place little importance on their appearance. Nerdsare often aware of their status, but they don't mind. In fact, many take pride in the putdown, as it means they're smart and not wrapped up in superficial worries.
Geek is a more specific term. Back in the day, geeks worked at carnivals, and (according to the dictionary) "bit the heads off live chickens." Thankfully, the term now has a different connotation. Like nerds, geeks are smart, but they tend to focus more on technology. As Urban Dictionary explains, these are the people you make fun of in high school and later work for as an adult.