There are a lot of factors that influence sway, and there is a lot of information (and misinformation) available about it. Everything from weight of the trailer vs weight of the tow vehicle, to weight distribution between trailer tires and tongue weight, to tire pressures all around, to 5th wheel vs bumper pull, to length of trailer vs TV wheelbase, all affect sway or lack of sway.
You asked a very open-ended question, and you are going to get a LOT of responses. Some of them will even be right on, as far as they go. Good luck sorting through it all to the answers that make the most sense to you.