When magma cools and solidifies, it forms new rocks. However, these new rocks do not necessarily make the Earth bigger. In fact, the Earth's crust is constantly being recycled as old rocks are broken down and new rocks are formed. The process of rock breakdown is called "erosion." Erosion can occur through a variety of means, including wind, water, and ice.
The Earth's crust is constantly changing, but its overall size remains the same. This is because the processes of rock formation and rock breakdown are balanced.