Open the construction menu (the helmet icon in the top left corner of the screen):
 
 
Purchase the building and place it on any available spot on your farm. The chosen spot has to be cleared of all obstacles for the building to be placed.
 
 
Gather the items needed to build it and use them to complete the construction:
 
 
If you do not know how to get a certain item, you can tap on the "?" hint button to see where you can obtain it:
 


Each building comes with 2 production slots. You can buy 2 additional slots for a total of 4. Choose the recipe you want to produce by sliding up and down between various recipes. Once you choose the recipe, simply drag it towards the building or use the start button.
 

You need to have the ingredients to be able to start production. The necessary ingredients for each recipe are shown on the left side of the screen.