As tectonic plates diverge, lava rises up and forms a mountain like a shape on the ocean floor.
The lava cools down thus forming/adding a new ocean floor.
As tectonic plates converge, the plates go upwards and create a mid-ocean ridge also known as a mountain-like shape.