They speak as prophets and dress like prophets. Often a prophet preached about repentance, and this was the message and garb of the two witnesses. We can say that they called people to repentance while themselves living a life of repentance.
Who are they? John answers this question by linking together a range of Old Testament prophets and leaders. He refers to Zerubbabel and Joshua (olive trees in Zechariah 4), to Elijah (who prayed for rain to cease for three and a half years, and who called down fire from heaven), and to Moses (who brought plagues on Egypt). I would suggest that the two witnesses describe in picture form all who declare the message of coming judgement, although mainly it could describe those who do so in an official way.
John points out that they will be opposed by the devil (the one from the bottomless pit) and he will cause the witnesses to be killed. This opposition will happen everywhere, even in Jerusalem which is here linked to pagan nations. When the witnesses are martyred, people will rejoice and despise even the memory of them. Their message was offensive to most people and they will celebrate when Christ’s witnesses die. This kind of celebration was common in the early church and many Christians gave their lives as part of the entertainment offered to the large crowds that gathered for their local games.
Yet the witnesses possess something incredible, which is the resurrection life of the Saviour. After a period, they are raised from the dead, and their resurrection is followed by their promotion to glory. Their experience is similar as to what happened to Jesus when he rose from the dead. Is John here describing part of what Paul details in 1 Thessalonians 4 when he says that after God’s people have been raised from the dead they, as well as those believers living at the time, will ascend to meet the Lord in the air?
John says that the effect of the raising of the witnesses is further judgement (earthquake) and a belated recognition that the message of the witnesses was true (the onlookers are terrified, and affirmed that judgement was coming, but it was too late for repentance). We can see from this response something of the concern that will mark people when they realise that the Judgement Day has arrived.