take a look at any recent "first-triangle" demo code (that uses openGL 3.3 or a newer version)
https://www.khronos.org/opengl/wiki/Buffer_Object