First, unplug your dryer and pull it out. The connection works through magnetic self-alignment, but it needs to be close. Look behind the dryer and check that your dryer's exhaust port and the wall exit point are aligned within 1 to 2 inches. If they're farther apart than that, the magnets can't pull it together.
Once you've confirmed the alignment, push the dryer back into position slowly. The magnets should pull the coupling together and seal it. If it still comes apart, you might need to adjust the position of the wall assembly or the dryer itself to get that close alignment.