Interpreters who hold to a more literal perspective argue that this is literal fire coming out of the mouths of the two witnesses. Of course, Elijah’s original ministry was protected by fires from heaven (1 Kings 18:38; 2 Kings 1:11-12). For instance, in the Left Behind films, there is a scene of the two witnesses literally shooting flames out of their mouths, as though they were flame throwers!
However, it is also possible that this isn’t literal. John could be explaining that their words are the words of judgment. In Jeremiah 5:14, God tells the prophet, “Because you have spoken this word, behold, I am making My words in your mouth fire and this people wood, and it will consume them.” Later in Revelation, we see that the fire of judgment is literal for those who rejected their message (Rev. 20:11-14). Thus the message of judgment could be what is in view here.