Can somebody tell me how to load GIF/JPEG images in to an OpenGL program which will be used as a background?

I use SDL and SDL_image

Not sure if it is better or worse for your case, but just saying,

Yes, I also thought of recommending SDL. It’s very easy to use.
FreeImage is definitely a lot better but if you just want to load image from file then SDL image will do.