For bars with droplets of caramel interspersed within:

A caramel that is very rich and gooey at room temperature is used along with a chocolate that is solid at room temperature. Droplets of this caramel are frozen. The chocolate portion of the bar is made in two halves (This is why there is a visible seam on the side of these bars). The mold is filled halfway with melted chocolate. The frozen drops of caramel are placed on this layer, then the second layer of chocolate is quickly added. The bar is then brought to room temperature, hardening the chocolate and returning the caramel to it's gooey state.
Source: http://encyclopedia.thefreedictionary.com/Cadbury%20Caramilk (pop-up hell site, beware)


For bars completely filled with caramel:

The best way to explain is to give the source (which is illustrated) up front:
http://www3.ns.sympatico.ca/mt-edward/cadbury.htm
These bars are typically made by use of a shell molding technique. Simply put, the topside of the candy bar is made by coating the bottom of a candy mold with chocolate. The filling is added, then the chocolate that forms the bottom of the candy bar is poured on top of this inverted confection.