All countries in French have a gender - they are either masculine or feminine.
Countries whose name ends in -e are feminine. All other endings are masculine.
feminine la France l'Angleterre l'Ecosse l'Irlande
masculine le Pays de Galles le Pakistan le Canada le Japon
When you say 'I live in...' the word for 'in' varies depending on the gender of the country. For feminine country names the word is en. For masculine ones it's au.
J'habite... en France en Angleterre en Ecosse en Irlande
J'habite... au Pays de Galles au Pakistan au Canada au Japon
The same rule applies when you say what country you're going to - for feminine countries, the word for 'to' is en, and for masculine countries it's au.
Je vais... en France en Angleterre en Ecosse en Irlande
Je vais... au Pays de Galles au Pakistan au Canada au Japon
Some countries or regions have plural names, like les États-Unis, the United States, or les Antilles, the Caribbean. In these cases the word for 'in' and 'to' is aux.
J'habite aux Antilles
Je vais aux États-Unis
For towns and cities, the word for 'in' and 'to' is à on its own.