Extraterritoriality is a big word that means a country can still have some control over its citizens when they are in another country. Imagine if you go to visit your friend's house and your mom tells your friend's mom to call her if you misbehave. That's kind of like what extraterritoriality is.
Let's say you are from Country A and you go to Country B for a vacation. Usually, the laws of Country B apply to you while you are there. But, if there is an agreement between Country A and Country B, then some laws of Country A might also apply to you in Country B.
For example, if you break a law in Country B, you might be punished according to Country B's laws, but Country A might also punish you when you return home. This is because some countries want to make sure that their citizens follow their own laws, even when they are outside of their own borders.
This concept is similar to a teacher being able to punish a student for breaking school rules at home. Even though the student is not at school, they are still expected to follow the school's rules.
Overall, extraterritoriality is a way for countries to have some control over their citizens even when they are in other countries, to make sure they follow their own laws and behave properly.