The answer to 'how to clean P-trap' is to regularly clean the P-trap under your sink to prevent clogs and odors. The P-trap is the curved pipe under the sink that holds a small amount of water to prevent sewer gases from coming up through the drain.
To clean the P-trap, first place a bucket or pan under the trap to catch any water that may spill out. Then use pliers or a wrench to loosen the slip nuts on either side of the trap and remove it. Use a wire brush or pipe cleaner to scrub the inside of the trap to remove any built-up gunk or debris. Rinse the trap with water and check for any cracks or damage. If the trap is in good condition, replace it and tighten the slip nuts back up. You should clean the P-trap every 6-12 months as part of your regular sink maintenance.