A tariff is a tax charged on goods as they pass between one country and another. A tariff can be placed on goods being brought into the country (imports), and goods being exported from the country to another. It is usually done to make money for the government. It may also be done for protectionism. Protectionism makes it easier for local products to sell by making products from foreign countries more expensive.
Often, one government will have an agreement with another not to place any tariffs on goods that are traded between them. This kind of agreement is called free trade.
The same word, tariff, is often used for the pricing of gas and electricity.