After you learn the fundamentals, dry fire is the next best thing. As I tell my students, dry fire can cure a lot of ills. You're practing the fundamentals without ammunition so you don't have the noise to deal with nor the feel of the gun recoiling in your hand. You can see what your sights are doing as you squeeze the trigger. If you are flinching, it can help you conquer that. It is by far the most cost effective form of practice.
To do it safely, you must take some precautions. First, put all the ammo in a different room. Second, use an exterior wall that is capable of containing a bullet if you goofed and didn't unload the weapon. Third, you want to visually and physically check the weapon to insure it is clear. That's right, touch every chamber on a revolver and insert a finger into the chamber and mag well on a semiauto. Fourth, use a light color wall as your backdrop. The contrast between the sights and the wall will allow you to see any movement of the sights immediately. Fifth, practice 2 or 3 times a week for 15-20 minutes at a time. Last, if your interrupted, stop. No sense in possibly accidentally loading the gun and forgetting causing you to accidentally shoot the wall, tv, etc,