A P-trap is the curved portion of pipe under the sink. It's supposed to create a seal by holding water, which prevents sewer gases from getting into the bathroom. If the P-trap isn't working properly, sewer gasses can make their way into the bathroom and cause your sink to stink.