Question: People have been telling me that "GPU renders triangles only".

But how do you explain GPU rendering a quad with 4 lines only in the wireframe mode, shouldnt it be rendering it with 5 lines since GPU cannot understand quads ?

On the other hand, how can i emulate quads in the future where GL\_QUADS is banned ? do i need a shader for it, do i need to generate new array of lines for each object and i cant just simply switch from GL\_FILL to GL\_LINE ?

Answer: 
Lines are something different than filled primitives. When switching to `glPolygonMode(…, GL_LINE)` whenever a filled primitive is started (GL\_TRIANGLES, GL\_QUADS), OpenGL won't sent commands for filled primitives, but lines between the vertices of the filled primitive. So GL\_TRIANGLES translates to tupled of 3 GL\_LINES, GL\_QUADS translates to tuples of 4 GL\_LINES. GL\_POLYGON is translated to a GL\_LINE\_LOOP. Of course those translations don't happen in terms of OpenGL, but the OpenGL driver will send commands to the GPU that are equivalent to what would have been sent; also there are some subtle differences between GL\_LINE polygon mode and sending actual lines, most notably the evaluation of the edge flag.
I din't understand your question fully but from what I understood here is the answer.

There are 2 concepts  

1. **Interpolation** Used for figuring out which pixels are to be drawn on a line.  

2. **Rasterization** Used for figuring out what properties (colors, texture etc.) to be assigned to the pixels lying inside a triangle.
GPU can **raster only triangles** and **interpolate only lines**. So when you are in a wireframe model only interpolation of the boundary of polygons is done. But when we are in solid geometry model along with interpolation we also raster the polygon.