SLR (Single lens reflex) are cameras that uses changable objectives and has abilities and features as well as photography quality which generally can't be achieved with compact cameras. Basic function difference between SLR and compact cameras is that SLR cameras have mirror and prism system which projects the scene it sees through optic finder. Meaning that the light that passes through objective over mirrors and prism passes towards finder until we press the trigger. In the moment when trigger is pressed, mirror lifts and light falls on sensor. With compact digital cameras light always falls on sensor and that is why "live preview" is possible on them.

Graphical explanation of SLR system