The religious leaders who were against Jesus were intent on bringing about his destruction. On this particular occasion, they were trying to trip him up and trick him into saying something controversial. It appeared that no matter what reply Jesus gave it would leave people unhappy with him.
They asked him, “Is it lawful to pay taxes to the emperor or not?”
If Jesus answered yes, it would make him very unpopular with the Jewish people as they did not like paying taxes to the occupying force (the Romans).
If he answered no, he could have been arrested for speaking against or leading a rebellion against the occupying force.
However, Jesus cleverly avoided the trap and instead asked to be brought a coin. He showed them the coin and asked, “Whose head is this, and whose title?”
He is telling them that since the money belongs to the emperor then they should give it to the emperor.
He stresses that their focus should be on loyalty to God:
Give to the emperor the things that are the emperor’s, and to God the things that are God’s.