Do my players know the specifics of an enemy’s attack

I’ve looked through the PHB and the RPG Stackexchange but I haven’t found anything regarding the following:

Many monsters have some kind of special attack or action that inflict a certain status on the PC. Usually the PCs can remove or escape this status by doing a certain kind of action.

E.g. The Fire Elemental can light PCs on fire and you need to expend an action in order to put it out.

How do I handle this information in regard to my players? Let’s take the Fire Elemental’s special feature as an example

  • Do I tell them that they are on fire and can put it out as an action in their turn?
  • Do I just tell them that they are on fire and let the players figure out what to do (which is obvious in this case but maybe not in other cases)?
  • If the latter is the case do the players lose their action if they attempt a wrong solution?

I usually tell my players what they can do to get rid of the status but I’d be interested if there is a rule somewhere that states how to handle this situation