Or can they occur anywhere?
-
Yes and No I know of none today that do not extend somehow under water. Portions involving land are Iceland where the boundary "constructed" the land mass and Ethiopia where a rift is emitting magma along portions of its length and is also allowing sea water to flow in along parts of the boundary as well.