How does the earth wire work? Since we say when the live wire touches the metal casing of the appliance, the appliance gets live and touching it we feel a shock. Now let's think about the same situation having a earth wire. Here the live and the earth wire complete the circuit and I am still touching the metal casing. I was touching that before it's getting live. Now, why don't I feel a shock since the live wire connects the earth wire by the metal casing and I was touching the metal casing since the beginning before it was damaged?
 A: The short answer is that the resistance of the earth/grounding path should be much lower than that of your body. So almost all the current goes through that, trips the circuit breaker or blows the fuse.
A: 
Here the live and the earth wire complete the circuit and I am still touching the metal casing. I was touching that before it's getting live. Now, why don't I feel a shock ....<

you were saved by chance as the wire connected to ground had  much less resistance  than your body and most of the current flowed through the wire which was grounded.
Your live  (having  voltage) equipment casing had a parallel connection with ground through your body.
But had there been your fingers wet or wet  sole of your shoes the electrical current  could have given a good shock.Do not play with it in future!

The best solution is to have a licensed electrician install one or more grounded outlets. Of course,this will take some time and money. Is there anything else you can do instead? 
If you don’t know what you’re doing, such as, if there’s no proper ground at the  receptacle, there is no equipment ground, therefore, no protection from electrical shock.
Another possible alternative is to get your power from a grounded generator supplying a 120 volts AC  grounded outlet. 

see for details: Be Careful

https://www.osha.gov/dte/grant_materials/fy07/sh-16586-07/4_electrical_safety_participant_guide.pdf

A: There's two things going on that you seem to be neglecting in your mental model of how this works. 
First, if there's a short from the line wire to the chassis (and then through the earth wire to the actual earth), then a large current will be drawn and the circuit breaker in your building power system should be tripped. If you're actually touching the equipment at the moment the short happens, though, a circuit breaker isn't likely to blow fast enough to save you from a dangerous shock. 
If your building has residual current devices (aka ground fault interrupt breakers) then this will happen even for very weak short circuits to ground, and it should happen quickly enough to have a good chance of saving you even if you're touching the equipment when the short happens.
Second, if the short isn't very strong, that means there is some resistance in the connection from the line voltage to the equipment chassis. Hopefully there is very low resistance in the connection from the chassis to the earth. Then, by the resistor divider rule, the voltage on the chassis will be only a fraction of the line voltage. If this fraction is less than about 1/5 (for a 240 V line voltage) then the voltage will be below 50 V. At 50 V or lower, you're not likely to be harmed by touching the equipment, unless you're compromised in some way (using a heart pacemaker, standing in a puddle, holding a grounded wire in your other hand, etc).
