Today it's cultured milk; originally, the liquid left from churning butter.
Buttermilk originally meant exactly what it sounds like: the thin liquid left behind after cream was churned into butter. Because the cream had often sat out and soured slightly, that liquid was tangy and a little thick.
The buttermilk sold in stores today is different. It's cultured buttermilk, made by adding lactic acid bacteria to low-fat or skim milk and letting it ferment. The bacteria turn some of the milk sugar into lactic acid, which thickens the milk and gives it its sour flavor.
That acidity is why buttermilk is so useful in cooking. It reacts with baking soda to make pancakes, biscuits and quick breads rise and stay tender, and it's a classic soak for fried chicken.
If you don't have any, a common substitute is 1 cup of milk with 1 tablespoon of lemon juice or white vinegar stirred in and left for 5 to 10 minutes.