Why trade if you can raid?
Even the best planner will sometimes have a shortage of one resource or the other. Once it will be spice for the next research level, the next time it will be metal for battleships. If you have a decent fleet and targets with the required resource, reading this is just plain wrong . But sometimes even the toughest raiders will be interested in a trade. Sometimes a trade is just more simple than a time consuming flight with unknown outcome.
Whoever seeks for trading partners does that though spying , by asking their alliance members, or on the public forum. The most important thing is: precise information. A text like 'Wanna trade metal for pig iron' does not help much. What's that supposed to mean? What does that guy want? Metal or pig iron? We don't know. This is much better: 'Who would send me (2:288:10) 50.000 kryptonite in exchange for 100.000 pig iron?', since no one wants to cross three galaxies to just trade a few resources.
Unfortunately does not have free exchange rates, but has to stick to the official exchange rates plus or minus 20%. If one player has much less points than the other (<75%) he may receive more than this rule permits. Other players (>=75% of the other trade partner) may not.
SI-Master has a trading tool to easily calculate the permitted price ranges.
The transaction itself
Both trade partners send a transport with the resources to the other. If they know one another, that's it, but what if my trading partner is an enemy? Both sides could recall their fleets...
If one of the two trade partners has much more fleet, he could be so fair and send his transports first. In case the other doesn't send anything back he could try to forcefully get it.