A visa is an official document that allows the visitor to legally enter a foreign country.
The visa is usually stamped or glued into the holder’s passport. There are several different types of visas, each of which allows the holder different rights in the host country including tourist, work, business or transit visa.
It depends on your passport and the country you are planning to visit. If your home country has a visa agreement with the country to which you intend to travel, then you likely will not need to apply for a visa beforehand. Many countries have visa policies and agreements that allow their citizen to travel freely between them without the need for a visa. Where do you find the correct answer? Check your official government website for your visa requirements.
Australian citizens check Smart Traveller UK citizens check GOV.UK and USA citizens can check Travel State.GOV.
If you do need a visa, it will have information on how to apply and what the requirements are. For example: At your closest embassy or via mail. You might be able to obtain a visa on arrival or Evisa.