Buildings are obtained by upgrading your town hall and are upgraded by using gold, there are many types of buildings but the ones you want to focus on are your town hall and gold vaults if you dont have a buttload of gems to spend on skipping townhall gold requirements. The more buildings the better but be sure to upgrade your buildings as much as possible, a strong defense is a strong offense so always level up your defensive buildings too. There are Military, Defense, and Resource buildings. The different types of buildings are as follows

Military : Hero hall and Guild hall
Use these to deploy heroes and join a guild

Defenses : Walls, Sniper Towers, Mortars, Air Defense, Magic Tower, Ermah Guard, Repaer, and Victory Statue.
Use these to protect from raids and strengethen your defenses. Pay attention to placement because some hit ground only(mortar) and flying only(air defense) and some hit ground & flying (sniper tower)

Resources : Builder Shack, Gold Vault, Gold Mine
Builder Shakes are used to add another worker to upgrade buildings and can be bought only with jewels, Gold Vaults determine how much gold you can hold at one time so be sure to always upgrade them, and Gold Mines determine how much gold production you get, imo these don`t need upgraded as much as other things since you can resource raid for gold faster.