Older barns were usually built from lumber sawn from timber on the farm, although stone barns were sometimes built in areas where stone was a cheaper building material.
Modern barns are more typically steel buildings. Prior to the 1900s, most barns were timber framed (also known as post and beam) forming very strong structures to withstand storms and heavy loads of animal feed. From about 1900 to 1940, many large dairy barns were built in northern USA.
These commonly have gambrel or hip roofs to maximize the size of the hay loft above the dairy roof, and have become associated in the popular image of a dairy farm. The barns that were common to the wheat belt held large numbers of pulling horses such as Clydesdales or Percherons. These large wooden barns, especially when filled with hay, could make spectacular fires that were usually total losses for the farmers. With the advent of balers it became possible to store hay and straw outdoors in stacks surrounded by a plowed fireguard.
Many barns in the northern United States are painted barn red with a white trim. One possible reason for this is that ferric oxide, which is used to create red paint, was the cheapest and most readily available chemical for farmers in New England and nearby areas. Another possible reason is that ferric oxide acts a preservative and so painting a barn with it would help to protect the structure.
Wiki