A fire can be used for boiling to purify water, to cook, to dry off clothes, to keep yourself warm, to see at night and for many other reasons.
To create a fire you must have oxygen, heat and fuel as seen in the fire triangle.
A fire will not light/stay lit if you remove any of these 3 crucial requirements in the fire triangle.
The oxygen for fire is in the air around us, the fuel can be your tinder or firewood and heat is provided from a lighter, match, firesteel or other source of lighting the fire until the fire is lit and then the fire provides its own heat.
Many people think the bigger your fire the better which is not strictly true. If you think of your cooker at home it does not give off a huge amount of flames which is the same as a fire, if you have a hot bed of red coals it is more than enough to cook/boil and give off heat.
Fire can be a great thing, but it can also be dangerous. Never leave a fire unattended.