Emigration from east Germany wasn't banned altogether, but it was set up so that you needed permission. Trying to leave without permission, or even just planning to leave without permission, was a capital offense and punishable with up to two years in prison for "light" cases, up to eight years in prison for "serious" cases according to §213 of East Germany's 1968 penal code
https://en.m.wikipedia.org/wiki/Republikflucht
You would not be granted permission unless you were elderly, could be trusted to return, or were a person whom the government wanted to leave the country for good. Ordinary working-age people who didn't have valid reasons like wanting to compete in an international sports event, or attend a scientific conference, were not granted permission to leave the country. Not even Joe Shmoe unskilled angry dissident types. In fact one of the jobs of the vast secret police was to keep tabs on everyone so that when someone applied for a permit to temporarily leave the country, the authorities could ask the secret police on how likely the person was to return.
AFAIK similar in Czechoslovakia, you had to be deemed realiable and have a valid reason to be allowed to travel to Western countries. But as everything was bureaucratic and corruption was rampant, if you knew the right people or it suited them or you just got really lucky you could get permission even if others could not. Or the opposite, if you were hated by someone with connections or got unlucky, too bad even if on paper everything was OK. The corruption was usually about personal connections and doing favors and not about money per se, although sometimes money was involved - usually everyone had enough money, problem was often finding popular goods to buy for that money (especially western goods), scarcity was the norm.
Families of illegal emigrants sometimes suffered - could not get higher education, could not leave country even for a vacation to fellow comblock countries like Yugoslavia, could not get better jobs etc. Not always, but it was not uncommon. Again, depends on how well you or your family was connected, and some luck was involved as well. But if you tried to leave and were unsuccessfull, well, you could be sure you were going to suffer, prison was just a start - all of the above applied, and then some, for you, and your family as well. Depends a lot also on the era, there were more and less strict years depending on current political situation - for example during Prague spring it was completely different than half year later after Soviet occupation.
If you were caught secretly crossing the border, there were also incidents of people getting shot on the spot. Around 400 people were shot on Czechoslovak borders trying to secretly cross them in 1948-1989.
The most used emigration path from what I heard was to go to Yugoslavia for a vacation, and emigrate from there (often whole families). The most popular destination was Germany as german was the second most taught language after russian in schools (of course I`m talking about second language, not primary). Sorry, no english, as that was the language of capitalist opressors
