Entering Costa Rica is fairly easy. Most people enter the country one of the main airports, Aeropuerto Internacional Juan Santamaría, just outside San José or Liberia. Overland border crossings from Nicaragua and Panama are straightforward if you have the correct documentation
Most nationalities do not need a visa for stays of up to 90 days. Check requirements at the Costa Rican embassy website. That said, some foreign nationals will require a visa, and you should be aware that you cannot get a visa at the border. At the time of writing the Covid-19 is still ongoing so there may be some additional requirements for entry. Check the Costa Rican government website for the latest information.
Passport-carrying nationals from the following countries are allowed 90 days’ stay with no visa: Argentina, Australia, Brazil, Canada, Chile, Ireland, Israel, Japan, Mexico, New Zealand, Panama, South Africa, UAE, USA and most western European Union countries. However, you should have a valid passport valid for a minimum of a day beyond your date of arrival and a ticket to either your home country or another destination that indicates you will depart within 90 days.
There is another list of countries whose citizens can enter Costa Rica with no visa, but whose passport must be valid for at least three months beyond their arrival date, including several countries within the Caribbean, South America, Oceania, and Asia.
Nationalities required to obtain a visa to enter Costa Rica include a number of African and Middle Eastern countries, including Saudi Arabia, Kenya, Tanzania, and Sierra Leone, as well as a handful of South American countries, including Colombia, Ecuador, and the Dominican Republic.
To check if your country is on the list of those required to obtain a visa, check the Costa Rican embassy’s website.