They used to do it with hay, newspaper and mud, or they didn’t do it at all. But insulation technology has taken a few leaps since then.
While there are different brands and materials, the four basic groups of insulation are: loose fill, batts/blankets, rigid/semi-rigid, and foam. The first two are generally cheaper than the last two, but you’ll also look at: the space available, exposure to moisture, whether you intend to cover the insulation, and the installed cost.
Loose fill is good for irregular spaces or areas that are tough to get at, but generally has the lowest R value per inch. It’s installed by blowing in (a job for a professional) or pouring. Loose fill is not good below grade; some types may compact when wet, making them useless.
Blankets and batts have better insulation value per inch than loose fill, and are easy to install in accessible, regular areas. They come in widths for standard joist and stud spacing, but are easy to cut to size.
Rigid and semi-rigid panels usually have an even better R-value per inch, which makes their extra expense worth it when you don’t have a lot of depth available. They’re lightweight and easy to cut in straight lines, but a bit of work in irregular spaces, and are often used in basements and on the exterior. And since most panels are very flammable, they must be covered with finishing material.
Spray foam insulation comes in small cans, handy for sealing small tight areas around windows and doors. It’s also installed in quantities by a contractor with special equipment. It works in similar situations as loose fill, and the higher cost is offset by a better insulating value per inch and the fact that it expands to help seal.