A double agent is someone who works for two different groups, usually groups who do not like each other. They pretend to be loyal to one group, but secretly give information to the other group. It's like pretending to be a spy for two different countries—you act like you are helping one country, but you give information you get from that country to the other.