Yeah, it's simple. There is a unit, usually a ghost or a civilian, that you can control in a small box. You move this unit up or down to "turn off the lights", or to cover up the map with fog of war so you can't see anything. While the map is like this, your worker thinks that it can build on any valid terrain whether other units are there or not.
Make sure you hotkey your probe and ghost/civilian before you go lights out though.