All animal buildings become available for purchase as your farm level increases. You can see the required level for the building in the Shop (the basket button in the lower left corner) in the Animals tab.
To build an unlocked building, tap on it in the Shop and place it anywhere on the farm where the arrow markers are highlighted in green. If the arrows are highlighted in red, there is an obstacle preventing you from placing the building.
In most cases, you can only buy and construct one building per animal type, but there are exceptions at higher levels: Chicken Coops (2 buildings), Cow Yards (2 buildings), Beehives (4 buildings) and Bombyx Houses (3 buildings).
Some buildings require special resources to build: planks, nails, bricks or screws. You can get them from chests or daily rewards, by completing tasks on the Beach, and by buying from other players in the Global Market.
When construction is completed, tap on the building and select an animal for this building to buy it (you can buy 2–5 animals depending on the building type). Please note that this transaction is for one animal and that the amount shown is the cost per animal, not the total number for this building.
To make animal feed, build the Feed Mill. Bees and bombyxes are an exception. For them, you need to plant Honey Flowers and Mulberry Bushes from the Plants tab in the Shop.