Trading
There are many merchants around Torisia you can trade with. Most of them are specialized in selling items of a certain type (E.g. minerals, food, etc.). You can see all merchants on the map by using a town service filter.

You can buy items simply by selecting amount to buy and clicking the "buy" button.
Selling
Most of the items in the game have a value they can be sold for, this value is visible in the item's tooltip. This can be done either by right clicking the item and clicking "sell" or dragging it in the trade window.

A few items however, cannot be sold.

Items are bought for twice the gold you can sell them for.
All merchants allow you to buy back the items you sell to them. This is merchant specific - any other merchant around Torisia won't have access to those items. These items also do not save and are permanently lost if you change a zone.
To buy items back, you have to open the trade window and click the "buyback" tab. You can buy back items the same way as can buy them regularly. These items cost the same amount of gold as you sell them for and you can buy back only up to the exact amount of them that you sold.
