If you are travelling to the USA, you will need to complete an online application to access the country. The application form is called the Electronic System for Travel Authorisation (ESTA) and can be completed at https://esta.cbp.dhs.gov/esta. The ESTA costs $14USD and lasts for two years or until your passport expires.
If you are travelling to Canada by air, either to visit or in transit, you will also need to complete an online application to access the country. The application form is called the Electronic Travel Authorization (eTA) and can be completed at https://www.canada.ca/en/immigration-refugees-citizenship/services/visit-canada/eta/apply.html. The eTA costs $7CAD and lasts for five years or until your passport expires. You do not need to apply for an eTA if you are travelling to Canada by sea or land.
In order to be eligible for an ESTA or eTA you must have an electronic passport with a digital chip on the biographic page. You must complete the ESTA or eTA online, so if you are unable to get internet access you will need to ask someone with internet access who can register on your behalf. You must complete your application at least three days before travelling and you will usually get a response within a few minutes. If you do not apply, you will be refused entry at US or Canadian immigration and once your ESTA or eTA has expired you will need to reapply.