textures

Basically,

How do I map a texture to a polygon surface? And where do I put the corresponding code in my code so that it works? Can Someone point me into the righ tdirection? I am a complete beginner. I jsut wanna use say a small .gif or .bmp of a random picture and have that appear on a set of blocks that I have in my program, instead of just shading the blocks with red, green , yellow etc etc…

Cheers,

http://nehe.gamedev.net/

Damn good for tuts.