Swearing itself is not illegal in the USA.
In the USA you have freedom of speech and it's your right to swear whether in public or at home and you cannot be ticketed or arrested just for swearing either in public or out on your front lawn or back lawn.
The only thing that you could be arrested for or ticketed is disorderly conduct.
But you would usually have to be constantly swearing and running your mouth and shouting out the swear words before it became enough of a problem as to have the cops arrest you or ticket you.
But just letting out a few swear words will not get you arrested or ticketed because you have a right to swear or give someone the finger as in flipping them off because that is protected under freedom of speech.