Before you go about cleaning your gun, make sure it's not loaded. Anytime you hear of a gun being fired unintentionally while it was being cleaned, you can be sure that someone failed in at least one way. Don't let that happen to you!
How you check the gun depends on the type and model of the gun, and if you own a gun you should absolutely know how to load and unload it. If you don't, then head to the nearest gun shop and ask for help. Any gun shop worth anything at all will be happy to show you how to load and unload your gun. If they can't or won't, then steer clear of that shop.
Once you've ensured that the gun is unloaded, check it again, just to be sure. Gun safety should always be given top priority.