I am learning OpenGL. Clip space, normalized device coordinate space and window space are confusing. I searched but still don't understand them clearly. So, the question is- what are differences between them and how are they converted from one to another? And what coordinate do the built-in OpenGL functions (e.g.: glBufferData) take as input?
Clip space is the objects' position in a coordinate system relative to the camera. -Z is always in the same direction the camera is pointing. You get it by doing the necessary transformations on the world space positions.
Normalized device cooridnate (or NDC for short) is the same coordinate system, but the Z values are in the 0->1 range. This can be achieved by dividing the x and y with z.
Window space is the NDC converted to device coordinates. OpenGL multiplies x with the width of the screen, and y with the height.
Your last question makes no sense in it's current state. Buffers can store everything, and they could store the same data in multiple different formats.