There is a very slight difference between the two.
A nerd is someone who doesn't fit in with the "popular" crowd. He doesn't dress fashionably, doesn't use the latest slang. He is socially and physically awkward.
A geek sometimes possesses some of those same traits, but he is always very intellectual and has a passion for something academic, whether it be computers, or history, or playing chess. Bill Gates is a good example of a geek.