In American English, the rule is that a collective noun is singular. "The team is ...", not "The team are ..." I understand that in British English, the convention is to use a plural verb with a collective noun when, in context, you are referring to the individual members of the group. I'll leave further discussion of UK conventions to someone more knowledgeable.
So the first sentence should be, "The class listens when its teacher gives instructions." Note whoever wrote the sentence used the singular form of the verb "listens", so it is elementary consistency to then use a singular pronoun.
Likewise, "The team is doing its best today."
I find the statement about uniforms more difficult. I would say, "The team members are wearing their new uniforms." You could also say, "The team is wearing its new uniforms".
That said, while grammarians and English teachers say this is the rule, native speakers routinely break it. If you said, "The team are wearing their new uniforms", I doubt that most English speakers would question it.