To add a pop-up, you can rely exclusively on HTML and CSS, but the OpenLayers 3 library bundles a component to help you to display information in a pop-up.
You will find below the reference for this component called ol.Overlay. Only a light review will be done here because some examples will follow to illustrate.
The object is instantiated with a constructor such as:
var yourOverlay = new ol.Overlay({
element:document.getElementById('yourOverlayElement')
})Because ol.Overlay inherits from ol.Object, we only describe here the methods related to the object itself.
You can check out the complete ol.Overlay API documentation at http://openlayers.org/en/v3.0.0/apidoc/ol.Overlay.html.
After this small component review, we will first see the simplest case for using ol.Overlay with a static example where the information is not coming from any query but only from a DOM element.