1. Physically entering a country's territory. This means crossing the country's border, either by land, sea, or air. In most cases, this will require you to have a valid passport and a visa (if necessary).
2. Staying in a country for a certain period of time. This varies from country to country, but it typically means staying for at least 24 hours. In some cases, you may need to stay for a longer period of time in order to be considered a visitor.
Additional considerations:
1. There are a few exceptions to these general rules. For example, some countries allow you to visit without a visa for a short period of time (known as a "visa waiver program").
2. In addition, there are some cases in which you may not be considered a visitor, even if you have entered a country and stayed for a period of time. For example, if you are a diplomat, a military member, or a foreign student, you may not be considered a visitor.
Ultimately, the best way to determine whether or not you have visited a country is to consult with that country's embassy or consulate.