Imagine you have a group of friends who all like to hang out together. Let's say they call themselves the "American Club". One day, a new kid moves to your neighborhood, he's from another country and wants to hang out with your friends. But since he's not a citizen of the United States, he's considered an "alien".
When it comes to the law, an "alien" is someone who is not a citizen or national of the country they are in. So basically, if you're in a country that you're not a citizen of, then you're an alien.
But being an alien doesn't mean you can't be in that country. There are different visas and permits that you can get to be in a country legally. For example, the new kid in your neighborhood might have come to the United States on a student visa to study in school. This allows him to be in the United States legally for a certain period of time.
Now, let's say the new kid decides he really likes living in the United States and wants to stay here longer than his student visa allows. He might apply for a green card, which is a document that allows him to live and work in the United States permanently.
But, there are rules and laws around who can get a green card. For example, you have to have a certain job or family member who is a citizen or permanent resident of the United States to sponsor you.
So, being an alien means you're not a citizen of the country you're in, but that doesn't mean you can't be there legally. There are different visas and permits to be in a country legally, and sometimes you can even become a permanent resident or citizen with the right paperwork and qualifications.