Mantle convection carries the heat from the Earth's interior toward the surface by means of rising hot mantle material and sinking cooler material. Because the material near the surface is cooler, it is denser and sinks. As it sinks, it is heated by the Earth's interior until it becomes less dense and rises. The cycle of sinking and rising material is called mantle convection.
As mantle material flows toward the surface, it partially melts due to the lower pressure. It is estimated that about 1% of the mantle consists of liquid. Some of the liquid mantle material collects in relatively small pockets beneath the crust. These pockets are what we know as magma chambers. When the pressure in the magma chamber becomes larger than the pressure of the surrounding solid rock, the molten material is released to the surface of the Earth. This is what we know as volcanic activity.
Mantle convection and magma chambers are essential to the recycling of the Earth's materials and the release of heat from the Earth's interior. They are also the source of most of the Earth's geological activity, such as earthquakes and volcanoes.
The answer to the question "Will we ever run out of magma?" is no. As long as the Earth has radioactive elements and a heat-generating core, there will be mantle convection and magma production.