Only pensioners got an exception and could travel from East to West to visit family. Everybody else had to try their luck digging tunnels (mostly in Berlin in the 60s), over the Baltic Sea or make it through the "Death Strip" alive, all ending very likely in death or if they're lucky, imprisonment (one of my uncles and his wife ended up with a 10-year prison sentence for trying to flee over the Hungarian border, and were eventually "bought out" by the West).
Travel from West to East was unrestricted of course.
We had working age relatives visiting us from the East in the West in the 1980s. But visa were not easily granted, not at all for people in many positions. And only for one person of a family at a time. I'm sure the Stasi checked in advance that the risk of not returning to their family was low.
Traveling from the West to the East was not free either. Officially it was only allowed to visit relatives and for cultural exchange. Individual tourist journeys were not allowed, only day visits to East-Berlin. But nobody checked very carefully whether the "relatives" were real. I had a friend of mine visit distant relatives of myself in the 1980s. They just filled in that the relationship would be cousin or something like that and nobody asked or checked. The East was interested in the money from the West. For every visiting day there was a mandatory exchange. From a Western point burning money because you could not buy anything of equivalent value for money in the East. I bought a big series of math books translated from Russian once. I fear I still haven't read them all. Maybe when I retire...
You could buy https://en.m.wikipedia.org/wiki/Bronshtein_and_Semendyayev in bad paper quality. I probably still have mine somewhere... But it costed probably something like 2 day rates. So if you visited weeks over a couple of years that did not solve the problem of the burnt money.
Travel from West to East was unrestricted of course.