The answer to 'how to fix P-trap' is that a P-trap is the curved pipe under a sink that helps prevent sewer gases from entering your home. If your P-trap is clogged or leaking, you can usually fix it yourself with a few basic plumbing tools. First, use a bucket to catch any water that may spill out. Then, unscrew the slip nuts on either side of the P-trap to detach it from the sink drain and wall pipe. Check for any debris or clogs and clear them out. You may need to use a plumber's snake or other tool to dislodge a stubborn clog. Once the trap is clear, reassemble it and tighten the slip nuts back up. Turn the water back on and check for any leaks.
If the P-trap is damaged or you can't get it unclogged, you may need to replace the entire trap. This is a simple DIY project, but if you're not comfortable working with plumbing, it's best to call a professional plumber to handle it.