Barn construction began out of a need for:
animal shelter, grain and feed storage, and machinery protection.

From Wikipedia:
A barn is an agricultural building used for storage and as a covered workplace. It may sometimes be used to house animals or store vehicles, and is often found on a farm.

On older style barns, the upper area was used to store hay and sometimes grain. This is called the mow. A large door at the top one of the ends of the barn opened up so hay could be put in the mow. The hay was hoisted into the barn by a system containing pulleys and a trolley that ran along a track attached to the top ridge of the barn.

The Barn Wood Emporium History of Barns with pictures

Enchanted Learning Barn craft activity

New England Tractor Barn New England barn model
CoxwellInterior.jpg (71435 bytes)
The Barn at Ivy Creek Natural Area / River View Farm