Although there are some simple fixes that will help prevent cracked window glass from failing immediately, the only safe and permanent way to fix cracked glass is to replace it. A crack in the glass compromises the structural integrity of the pane, and it's much more likely to shatter if it's struck by anything or subjected to stress from wind or temperature changes. It may even fail spontaneously. Consequently, you should always consider repair techniques to be stop-gap solutions that will help keep the glass intact only until you can replace it.
Applying a piece of tape, either masking tape or clear packing tape, over the crack on both sides of the pane can help to keep the glass intact and keep water from working its way through the crack until it can be replaced. Apply the tape so that it extends past the crack on all sides, and press it firmly against the glass.
If there are multiple cracks and the integrity of the pane is severely compromised, it's best to remove the glass entirely and cover the opening until you can replace the glass. While wearing heavy gloves, carefully remove the broken glass by removing the putty and glazier's points around the edges of the pane. When the glass is gone, cover the opening with thick plastic sheeting and staple the plastic to the window frame.
Solvent-based glass adhesives are marketed for car windshield repair and are available from auto parts retailers. They are designed to flow into cracks in the glass and help hold it together until the glass can be replaced.
Blow any dirt out of the crack.
Use an eyedropper to flush the crack with solvent to clean it thoroughly.
When the crack is clean, apply tape to the back side of the crack to hold the crack together and to keep the adhesive inside the crack.
Apply the adhesive to the crack using a syringe or brush and allow it to dry thoroughly before removing the tape .
Replacing a broken pane in a modern insulated window is a task for a qualified glass repair technician. Replacing the glass in an older single-pane window is a project that may be within the capabilities of an experienced do-it-yourselfer, but it's a complex job that requires removing the old putty and glazier's points, removing the broken glass, installing new glass and replacing the points and putty. If you're not comfortable doing the job yourself, call a technician.