If you're on Windows, they are installed with the platform SDK (or Visual Studio). However the header files are only compatible with OpenGL 1.1. You need to create function pointers for new functionality it later versions. Can you please clarify what version of OpenGL you're trying to use.
Locate your Visual Studio folder for where it puts libraries and also header files, download and copy lib files to lib folder and header files to header. Then copy dll files to system32. Then your code will 100% run.
Also Windows: For all of those includes you just need to download glut32.lib, glut.h, glut32.dll.
On Windows you need to include the gl.h header for OpenGL 1.1 support and link against OpenGL32.lib. Both are a part of the Windows SDK. In addition, you might want the following headers which you can get from http://www.opengl.org/registry .
<GL/glext.h> - OpenGL 1.2 and above compatibility profile and extension interfaces..
<GL/glcorearb.h> - OpenGL core profile and ARB extension interfaces, as described in appendix G.2 of the OpenGL 4.3 Specification. Does not include interfaces found only in the compatibility profile.
<GL/glxext.h> - GLX 1.3 and above API and GLX extension interfaces.
On Linux you need to link against libGL.so, which is usually a symlink to libGL.so.1, which is yet a symlink to the actual library/driver which is a part of your graphics driver. For example, on my system the actual driver library is named libGL.so.256.53, which is the version number of the nvidia driver I use. You also need to include the gl.h header, which is usually a part of a Mesa or Xorg package. Again, you might need glext.h and glxext.h from http://www.opengl.org/registry . glxext.h holds GLX extensions, the equivalent to wglext.h on Windows.
If you want to use OpenGL 3.x or OpenGL 4.x functionality without the functionality which were moved into the GL_ARB_compatibility extension, use the new gl3.h header from the registry webpage. It replaces gl.h and also glext.h (as long as you only need core functionality).
Last but not the least, glaux.h is not a header associated with OpenGL. I assume you've read the awful NEHE tutorials and just went along with it. Glaux is a horribly outdated Win32 library (1996) for loading uncompressed bitmaps. Use something better, like libPNG, which also supports alpha channels.
Mesa is evidently significantly larger. Its headers are
a bit variable, I suppose, depending on the flags given
to meson, but should include these typically:
2022 Update: On Windows, the platform SDKs and Visual Studio no longer install gl.h anywhere.
I have installed Visual Studio 2017, 2018, 2019, and 2022, and SDKs for Windows 8, 10, and 11. A search of my entire disk for "gl.h" produces no results. Searching for "windows.h" locates it correctly in VS's /include directories.
Googling how to acquire those header files simply instructs you to install VS and the SDKs.