In a small room, light bouncing off walls should be enough to trigger it. Do make sure though that the sensor window is facing either the flash or the subject that the light will be reflected off.
Daft thing, but be such which one IS the sensor window. The slave sensor on some flashes (SOme Nikon speedlights) is actually a small window near the battery compartment, NOT the larger reddish panel on the front of the speedlight (where you'd expect it to be!!)
Tbh I gave up with optically based trigger systems ages ago - they're too unreliable. For £20 you can get a set of radio triggers (RF602's) - far more reliable & much greater range.
Edit: Ah - I keep forgetting, Canon speedlights don't have an optical slave mode - I thought we were talking just optical slave triggering not Canon's wireless system.
Incidentally, regarding BriaR's last paragraph, you can use your pop-up flash as an optical trigger with OTHER flashes that have optical slave mode. The 'pre-flashes' BriaR refers to are only if the flash is in TTL mode. If you can set the flash to manual, you get no pre-flashes & the flash will trigger correctly.
OR if you get a flash like the Yongnuo YN560 (around £50), it has an optical slave mode (S2 from memory) that ignores TTL pre-flashes, so even if you use a TTL trigger flash, it will ignore the pre-flashes & fire on the main flash.