To remove the egg from the bottle after the initial trick, turn the bottle upside down. When the bottle is inverted, the egg should fall to the neck of the bottle. Once it does, blow into the opening of the bottle until it seems as though you can't anymore. After you're done blowing, the egg should easily squeeze through the top.
As air is blown into the bottle, it will be blown around the egg. This creates a tremendous amount of pressure on the actual egg. When the forced pressure is greater than the original pressure, the egg is forced out the top of the bottle.
If you want to perform the magic trick in its entirety, getting the egg in the bottle is a crucial element. To do this, you will need a match, a peeled hard boiled egg and a glass bottle. Light a match (or a small sheet of paper) and place it in the bottle. Immediately place the egg on top of the bottle. As the air heats, the pressure rises. Once the match burns out, the pressure is immediately lowered, sucking the egg into the bottle.
There is an alternate way to remove the egg from the bottle, but it may be less appealing as a trick, and simply practical. By filling a container with warm water, and placing the bottle in the container, the warmed air will increase pressure in a manner similar to the method of placing the egg in the bottle in the first place. The increased pressure will cause the egg to squeeze out of the bottle. You can also use a long object to cut the egg into pieces while still in the jar, and then shake the pieces out.