Campfires are a craft-able structure made from 5 Branches, used to cook Raw Fish and Raw Duck.
These items despawn in half an hour to keep server load low, taking any items inside with it.
You will need a Knife to collect Branches, and Lighter to light the campfire.
The campfire can be found in the autonomous section of the crafting menu (Open by pressing B)
Select the campfire and place it down, from there, collect 5 Branches, and finish the crafting by placing it inside the un-crafted campfire
Once you have placed your campfire, you can now cook with it. In order to cook, you will need fuel for the fire, for this, you can collect more Branches, or use Logs
Place your fuel into the campfire, along with the food you would like to cook, and then light it with a Lighter;
Each piece of raw meat will take 20 seconds to turn into cooked meat, and then 20 more seconds if left in the fire to turn into burnt meat.