Literally it is have on themselves. har på sig is a reflexive particle verb. The particle på is always stressed, and the reflexive pronoun changes with person:
jag har på mig I wear
du har på dig you (singular) wear
han/hon har på sig he/she wears
vi har på oss we wear
ni har på er you (plural) wear
de har på sig they wear
I believe that inte should go after the verb and before the particle (Jag har inte på mig hattarna/I do not have on myself the hats). Similarly, when it is a question, the subject and the actual verb (har/have) is switched (Har du på dig hattarna?/Are you wearing the hats?)
By the way, I'm curious of the situation in which you'd need to declare you're not wearing hats
The literal translation is "They have on themselves hats". For some reason (i'm not a linguist so i'm not sure why) they have to add "mig", "sig", "dig", etc. sort of like French reflexives. (again i'm not really sure, but i've just gotten used to "sig" and "mig") This probably didn't help
They do, in the tips section: https://www.duolingo.com/skill/sv/Pronouns-objective/tips-and-notes
Maybe I am a bit nitpicky but I prefer more exact translations rather than the simplified ones. I have to mouse over each word and discern a more apples to apples translation is "they have on themselves hats." Yes, we would say "they wear hats" but there's only one way to tell what each word means.
The reason is that it needs to be reflexive. They are wearing the hats themselves and not on other people.
De har på sig hattar - They are wearing hats themselves, all is well.
De har på dem hattar - Oh, no! They are wearing hats on other people! Chaos!!! Dogs befriend cats, and the streets run red with ketchup! (Also, it sounds weird).
They are wearing hats. Seems to be more appropriate here, because har på sig seems to imply that it is currently happening. Whereas saying "they wear hats" could be a general statement, like "they wear hats, when they go outside" , even though they may not be wearing them right now.