Where does the word nerd come from? Difference between a geek and a nerd?

nerd nəːd/ noun informal: a foolish or contemptible person who lacks social skills or is boringly studious. Single minded, expert: "I was a serious nerd until I discovered girls and cars" synonyms : bore, dull person; "a computer nerd"