Install GeoServer (in this case Geoserver 2.5.2) on machine, then acces the adminpanel of geoserver through: localhost:8080/geoserver/web
And login with user admin and pass geoserver.
Go to Workspaces and click 'Add new workspace'.
Go to Stores and click 'Add new Store', choose PostGIS database. Next choose the workspace created at 1 and fill in the connection details of your PostGIS service and database.
Go to Layers and click 'Add new resource', then choose the datastore you created at 2 from the dropdown-list. This will give you a list of tables from the PostGIS database, which you can publish. Obivously the layers to publish need to have a geometry column. You can configure the layer by filling in the details and you have to set the 'Bounding Boxes' by clicking on 'Compute from data' and 'Compute from native bounds'.
Go to Layer Preview to view your just published layers in the openlayers client. If you click on the list icon in the top corner you can adjust the WMS query, by adding a CQL filter, changing the image format, change the style of the layer etc.