Surface mounting is a technology of mounting electronic components directly to a printed circuit board (PCB). An electrical component mounted in this manner is referred to as a surface-mount device (SMD). Before, electronic components were mounted mostly by means of through-hole technology, where the component pins were inserted in holes in the PCB and soldered.
Surface mounting is very interesting because it is more appropriate for automating the component mounting process.
Surface mounting is used for the majority of components, from simple resistors, to complex multi-contact integrated circuits (IC). Still some components, like large transformers or heat-sinked power semiconductors are mounted by means of the through-hole technology. Both technologies can be merged on one PCB.
The advantage of surface mounted components is that in general they are smaller and have smaller leads or no leads (e.g. small pins, flat contacts, solder balls, etc.).