Trading is used to prevent in-game scams from happening. To trade with a player, you have to do
/trade (player name). If you have been asked to trade, you should see in the chat
"This player wants to trade with you". Just do
/trade accept or
/trade deny if you want to or do not want to trade with them. In the trade GUI, you have one side for items that you can put, and the other side for where the other player can put the items.
You must make sure which side is yours. You will see
your name and the
other player's name at the top of the GUI. You also have the option to
add money. When you are done with trading, you and the other player both have to press the
accept trade button on the bottom of the GUI. If you want to
cancel the trade, you must hit
deny. One tip is to make sure you know what to trade before /trading due to you not being able to type while the trade GUI is up.