In a world in which trade was totally free, there would be no tariffs, since the tariff is a protectionist measure. When an imported product is subject to a tariff, it becomes less competitive in the domestic market.
This is usually done to protect industries or products of the importing country from potentially destructive foreign competition. It is especially important for strategic sectors whose collapse would cause job losses.
The opposite is the case when a good is in short supply in a country. In this case, tariffs are usually lowered or eliminated to facilitate the entry of the product.
There are three types of tariffs:
-Ad-valorem. This is the most usual, it is a percentage of the value of the product.
-Specific. Its value depends on the weight or volume of the product.
-Mixed. A weighted mixture of the above two.
Each product has a HS code. It is a number that indicates in detail to which typology it belongs (textile, food, etc). This code is used to calculate your tariff.
Here is a page where you can see what each code number corresponds to: