At first, you must know that you can run a given version of OpenGL in two different profiles: Compatibility profile is supposed to be compatible with the previous versions, and Core profile which doesn't support previous versions but might be faster/smaller. There is also a forward compatibility mode, best for you is to check on OpenGL website for more details about them.
Assuming you're using wgl to create an OpenGL context and glew, here is a code snippet that gives you access to advanced options such as version and profile:
// Usual initialization
GLint attribs =
// Here we ask for OpenGL 2.1
// Uncomment this for forward compatibility mode
// Uncomment this for Compatibility profile
// We are using Core profile here
HGLRC CompHRC = wglCreateContextAttribsARB(Context->hDC, 0, attribs);
if (CompHRC && wglMakeCurrent(Context->hDC, CompHRC))
Context->hRC = CompHRC;
Don't forget to include
wglew.h to get access to
wglCreateContextAttribsARB. If you're not using glew (or something equivalent), I think you should do, especially if you're working under Windows and want to avoid a lot of pain.