A torus is a surface shaped like a donut. Imagine that I've painted two rings on a torus. One is on the outer surface, and goes through the hole in the center, coming around from the other side. The other ring is on the inner surface, and goes all the way around the hole in the center. These two rings of paint are linked.
I then cut a small hole in the torus. Through this hole, I turn the torus inside-out.
In the process, the rings of paint switch from the outer surface to the inner surface and vice versa. Therefore, they have become unlinked. How?
The rings have indeed switched from outer to inner and inner to outer, but they have also switched locations. The ring that used to go through the center now goes around it, and the one that used to go around it now goes through it. Therefore, the rings are in fact still linked.