The answer to 'how to fix drain trap' is to clean or replace the drain trap. A drain trap is a curved section of pipe under a sink or tub that holds a small amount of water to prevent sewer gases from entering the home. Over time, the trap can become clogged with hair, soap scum, and other debris, causing water to drain slowly or back up.
To fix a clogged drain trap, you can try using a plunger or drain snake to clear the blockage. If that doesn't work, you may need to disassemble the trap and clean it out manually. Be sure to turn off the water supply and place a bucket under the trap to catch any water that spills out. If the trap is cracked or damaged, you may need to replace it entirely.