Once any physical blockages and clogs have been cleared, pour some boiling water down the drain to loosen anything you might have missed (via Bungalow). Then, mix a cup of vinegar and one cup of baking soda and pour down the drain. Distilled white vinegar works best for this (just like those volcano projects in elementary school). Once you have dumped this mixture down the drain, allow it to sit for fifteen minutes or so. This will help to dissolve any residues and scrub the drain and pipes clean.
After fifteen minutes have passed, pour more boiling water down the drain to rinse and flush anything else that might be left behind.
Should this not fully remove any backup you are experiencing, you might need to try a drain snake, and in the event that even that fails, it might be time to call in a professional plumber. But for everyday unclogging and cleaning, this simple, natural trick should keep your tub and shower running smoothly and smelling fresh!