What camera were you using? Were you trying to use an onboard flash? The answers you were given will work if you're using most Canon DSLR's, but the first methods cedes more control to the camera and the 2nd requires more experimentation and a better knowledge of the camera's controls.
When asking a question it's very useful to include details about your equipment and settings and what effect you were trying to achieve. Additionally, an example photo can provide a great deal of additional information.
Regards,
Mark