You don't say which country you're in or the colours (colors) of the wires...no matter...
Here's a picture of the European wiring for a ceiling fitting...
http://www.flameport.com/electric/lighting_circuits/ceiling_rose_end_newcolours.png
Notice that LIVE does not go to the lamp - just to the switch. The switch supplies Switched Live to the lamp so you can turn it on and off.
The terminal block / junction box at the ceiling needs to be 4 way.
Live - Switch connection only
Neutral - Lamp connection
Earth - Lamp connection
Switched Live - Switch and Lamp connections
Hope this helps...Take care...Good luck...
Peccavi
February 2009