Mesh in not straight any more, when I render it becomes rounded
There are two settings for subdivision in the subsurf modifier (and other modifiers as well)

View determines the number of subdivisions for the viewport.



Render controls how many subdivisions it will have when you render.

It is designed that way so that the computer is not bogged with unnecessary computations while you work on the scene, and is more responsive while modeling, and then when you want to render you can have a smoother model. 

Also, modifiers have switches that might be toggled for viewing and rendering. It is possible that one of the modifiers is disabled for viewing but is enabled for rendering.



The Camera icon enables or disables rendering using the modifier.

The Eye icon toggles visibility on the 3D viewport.