From the description of the Use an Object action in the PHB:
You normally interact with an object while doing something else, such as when you draw a sword as part of an attack. When an object requires your action for its use, you take the Use an Object action. This action is also useful when you want to interact with more than one object on your turn.
This isn't particularly useful for your example, and I would say that the actual implementation of that is best set by the DM. Personally, I would rule it as an object interaction - uses their action - and get the player to make a Dexterity check to see how accurate they were (I don't tend to give away stuff like that for free), but other DMs would obviously have different opinions.
But I don't think there is anything RAW that specifies how to play it.
As pointed out in a comment below, the oil flask is specifically mentioned as being able to be thrown as an action and then set alight.