There are two kinds of migrations - within market (and by extension within a country too) and via migration waves. The mechanics are different, as with first the pops move constantly, and with the second it only happens sporadically, and only to a single group.
Primary things to look at is migration attraction and acceptance. Pops really don't like moving to somewhere, where they won't be accepted, so if they are discriminated by your laws, don't count on them to come. For example if you get Mexico into a British market you are likely to see a lot of Irish and Portuguese, but not many English or Scottish pops, because of catholic state religion, which would discriminate protestant pops.
Migration attraction on the other hand is a value for each state. Within market pops will try to flee low attraction states and go to high attraction ones. And if you want a mass migration to target your state, and not one in a different country, it ought to have high attraction to be competitive. What contributes to it you can see in the state overview by hovering over the attraction value. Broadly it's about high local standard of living, available arable land, available jobs, etc, with stuff like unemployment or turmoil drastically reducing it.
Meanwhile your migration law basically doesn't matter. Closed borders means no movement of people, but controls or no controls just dictates if discriminated pops can move, but since they very rarely will decide to do it if it means going somewhere where they will be discriminated, it hardly makes a change. It's currently mostly about blocking unaccepted pops from leaving your conquered colonial states and going to your mainland.
Many details changed, but broadly the mechanics are the same as they were announced before release in
DevDiary 17.