A refrigerator or freezer should be defrosted when the layer of ice on the cooling coil gets in the way of normal operation. A thick layer of ice will reduce the usable space, and may also increase the temperature in the compartment, as ice is a fairly good insulator. If you are losing food in the layer of ice, it is probably time to defrost your freezer.
Please note:in the following description, fridge will be used to mean either a refrigerator or a freezer
First, remove all the food from the fridge and either eat it (best accomplished over several days), throw it away (if it looks funny), or place it in a well insulated cooler.
Next, unplug the fridge and open the door to allow the cooled compartment (where you place the food) to warm up. As the ice on the cooling coils begins to melt from the warm air, water will form and may collect in the fridge or on the floor underneath it. If you are not prepared for it, (with towels or a floor drain) it will cause a big mess.
If you are in a hurry, you can use hot air (from a hair dryer)or hot water to help melt the ice. The hot air is less likely to cause a huge mess, but the hot water will work faster. For safety reasons,(you don't want the cooling coil to rupture) a blowtorch is not recommended.
As the ice begins to melt, the ice nearest the cooling coils may melt before the ice above it. You can then slide the remaining pieces of ice off of the cooling coils and dispose of them before they melt. These pieces should always be removed gently, without the aid of sharp objects, because it is fairly easy to puncture the cooling coil, releasing the coolant and ruining the fridge. (not fun, especially as some coolants can be toxic. For horror stories, see How NOT to defrost a fridge.)
Once all of the ice is removed, wipe off any remaining moisture and plug the fridge back into the wall. Close the door and allow the fridge to get back to its set temperature.(This can take up to 24 hours.) When the fridge is cool enough to perform its function, any food that was removed can be replaced.