Macromolecule protein enters and exits the nucleus through the nuclear pore complex (NPC). The "basket" model of core-pore complex determines that this migration is an active migration process, so it is energy-consuming. For example, some mitotic protein binds to transporters and is transported through the nuclear pore complex.
Small molecules enter through the nuclear membrane, and there is a central plug in the center of the nuclear hole. Many hydrophobic groups prevent small molecules from entering and leaving freely.