quantum, when using a mechanical relay, you will charge a coil which will move the switch contact. In a solid state relay this is achieved with LEDs and Phototransistors or a similar solid state type of device. When using microcontrollers, you do not want to source or sink a lot of current, so you usually trigger a transistor with the micro. The transistor then triggers the relay since the transistor is better able to handle the current. For example, if the coil on your mechanical relay is rated at 80 ohms, we know the micro will send 5 volts out the pin, so V/R=I (5/80=63 mA). Your micro pin cannot handle much more than 10 to 20 mA, so this would fry your micro if connected directly.
Hope I have answered what you wanted to know.
MP