The trap not only constantly holds water inside it, to block out noxious vapors that would rise through the drain, it also often receives chemicals designed to clear out clogs, which often settle into the curved trap before reaching the straight portion of the drain pipe. Therefore, the trap is often the first part of the drain plumbing to fail and need replacing. If the S-trap simply leaks at the joints, you can possibly tighten it, but if it continues, or leaks from a spot along the trap, replace it.
It is likely, especially if the drain has the original S-trap in place or if it has not been changed in a long time, that the S-trap is made of metal. The problem with metal pipes is that, over time, they corrode and develop leaks. Avoid this when you replace the S-trap by installing a PVC S-trap. The plastic trap is not only easy to install and remove, compared to a metal one, but it will not corrode.
An easily noticed difference between an S-trap and a P-trap can be seen by looking under two sinks, where one has an S-trap and the other a P-trap. The P-trap connects to a horizontal arm of piping that goes back through the wall. By contrast, the S-trap connects to a vertical pipe that goes through the floor. Although S-traps are not permitted in new construction, you can replace one that you already have with a new S-trap instead of changing the fixture's plumbing to accommodate a P-trap. Both S-traps and P-traps lead to the sewer line.
When you replace the S-trap, take it with you to the hardware or home improvement store. This way, you can obtain a replacement that is the exact size, because different fixtures require different trap sizes. If there is a tight fit for the S-trap between the two vertical sections of pipe it connects to, fold the S-trap back on itself to make it fit easier. PVC pipe and slip nuts normally allow you to tighten them by hand, but finish tightening them with a pipe wrench, if necessary, to get the slip nuts snug.