When you wrap a rectangle around a sphere, all points at the top edge are identified – thecedge is compressed into a single point, the "north pole", and similarly with the bottom edge. When you go off the top/bottom edge of Mercator at longitude N, you emerge at another point at the same edge, namely at longitude N+180 (mod 360).
(Also, in Mercator it looks like you can approach the top or bottom edge diagonally, but this is an illusion, an artifact caused by the projection. You can only ever approach the north pole directly from the south, and once you cross it, you find yourself having "rotated" exactly 180° and are now facing south, in addition to having jumped to the opposite longitude. And vice versa for the south pole.)
The poles don't get identified with any point in the plane at all, really - the Mercator projection is infinitely tall, less a rectangle than an infinite strip.
The equirectangular projection does map the top and bottom edges to their respective poles, but Mercator just keeps going up (and down).
(Also, in Mercator it looks like you can approach the top or bottom edge diagonally, but this is an illusion, an artifact caused by the projection. You can only ever approach the north pole directly from the south, and once you cross it, you find yourself having "rotated" exactly 180° and are now facing south, in addition to having jumped to the opposite longitude. And vice versa for the south pole.)