Fire is a basic crafting item that can be created using two sticks.
When a fire is first created, it has about 25% fuel. More fuel can be added by grabbing a fuel item (stick, coal, log) and pressing the build button while holding the fuel item and being near the fire.
Fire will keep a player at a normal temperature and will prevent the player from freezing to death. If you are going to be sleeping during the night, ensure that you have a lit fire with ample amount of fuel to prevent freezing to death.
Fire can also be used to cook food items. While holding a food item near a fire, press the build button to cook the food. The food will be removed from you hands and you will need to pick up the cooked food again before you are able to eat it.