How glVertexAttribPointer works?
How I call glVertexAttribPointer for the GL_ELEMENT_ARRAY_BUFFER buffer?


You don't. The element array buffer is used to store vertex indices, not vertex attribute data and therefore it doesn't have attribute pointers. The count, size, and offset for index data is specified in the draw call, e.g. glDrawElements.