How do the different kind of lamp dimmers work
Wikipedia has a nice article on phase angle control which is used for most house hold light bulb dimmers. They usually don't work for halogen, LED, TL. This is a typical case where a single image says more than a thousand words:



It works by chopping a (varying) part from the sine wave using a triac. The image shows a rectified wave, but the mechanism works equally well with an unrectified one, the latter being most common in household light bulb dimmers. The dimmer is connected in series with the lamp and therefore needs to see a minimum load (in the order of 10W) to work.

This is the classical dimmer. Not sure how halogen / LED / CFL differs from this, but I know from experience (with CFL) that an unmatched dimmer can make the lamp flash at a really annoying frequency.