What are Corns? How are they different from Viral Warts and Calluses?

Sometimes there are patches of hard, thickened skin appear on the feet or the hands. How can you tell whether they are corns, warts or calluses?