There's tutorials all over the place on this subject. The ones I am fond of are the ones here, and here. There are further references linked from each of those general areas. I might be a little biased in at least one of those cases.
And by the way, Googling "buffer overflow tutorial" led me directly to one of the tutorials that I just mentioned. Just sayin.
Some other general links I have found helpful that I dont think are linked from either of the above:
"Hacking: The Art of Exploitation" is a good book on the subject, as is "The Shellcoders Handbook".