When plates move towards each other it is called a convergent boundary. The two types of plates converging depends on what happens. When it is oceanic/oceanic, both plates subduct (go downward), leading to the creating of trenches found at the depths of the ocean. When an oceanic plate converges with a continental plate, the more dense oceanic plate subducts under the continental plate, again creating trenches, and also leading to the destruction of the ocean floor. When continental plates converge, they tend to smash up and rise, creating mountains.
When plates move apart, it is called a divergent boundary. When oceanic plates move apart, magma rises, cools, and solidifies to create new ocean floor. This, along with continental/oceanic convergence, accounts for seafloor spreading. When two continental plates diverge, the area left between them slowly turns into an ocean. For an example of this type of ocean, look at the Red Sea.