Vulgarity: offensive language of a scatological nature or pertaining to the body in non-sexual context. If a farmer uses it, he is likely to be doing so literally.
Obscenity: offensive language of a sexual nature.
Profanity: offensive language of a religious nature. Considered blasphemy by religious adherents. Words sometimes considered profane may be used literally by religious adherents in religious context.
Some words considered offensive may be applied to fit more than one category, but context normally indicates into which category a particular usage fits.
Please note, if a mother describes frankly what she had to get out of the carpet after some clever child escaped his diaper, she has not used profanity or obscenity. (Mothers are basically farmers.)