Building is the creation of map objects, such as walls and floors. You can plan builds by utilizing a process called blueprinting.
To build, make sure you have the required materials. Press the Build button (default is B), which will bring up a menu at the bottom of your HUD, allowing you to construct using wood, stone, iron, clay, and marble. Click the category you want to work with, click the object you want to build, then click any visible tiles to blueprint your constructions. Walking by your plans will automatically use the materials in your inventory to place them. To remove plans, exit the build menu and click to remove the ones you need to erase.
You can also destroy structures that appear in the game. To destroy wood structures and crops, equip an axe and double-click to automatically chop them down. The other four materials' structures can be destroyed in the same manner, except that a sledgehammer is required. You can immediately dismantle structures that you've created, given that you have the right tool.