I think it prevents your ships from going there, but as mentioned it won't work on your own colonies. I'm not sure the effect on civvies, but afaik they won't visit random planets anyway.
If it's colonists you're having problems with, the best way I know of to control their flow is to set the sources of colonists to stable (any planet that is set to "source of colonists"), and ship any colonists you want manually, but that's a little micro-managementey and often won't be as fast (depending on how well your civ lines are flourishing).