What is glBindTexture for?

I’m very confused as to what this method even does, and when to use it.

I have a simple question, really.
Do I use this just after creating a texture, and then I can reference it when I need it drawn, or do I have to make this call
right before drawing the texture on a shape?

This is in an environment where multiple shapes and textures are drawn.

When you bind a texture, it means further commands like glTexImage2d (which loads data into a texture) and glTexCoord (which associates texture coordinates with a vertex) refer to that texture. Think of it as setting a global “current texture” variable.