Distillation is the basic process that defines whiskey, although many other things are distilled besides whiskey. Vodka is distilled from potatoes (among other things). Brandy is distilled from wine. Whiskey is distilled from a mash of fermented grain(s).
At its core, distillation is the boiling of a liquid in order to separate it into its constituent parts. The fact that different liquids boil off at different temperatures is what makes distillation possible. As the base liquid heats up, its different components will become separated as each part reaches its own boiling point. The steam is then condensed back into a liquid through cooling tubes and collectors. Any solids will be left behind.
This diagram shows the most basic still operation. Distillation techniques have come a long way since the first still was used, but the foundational principles are the same.