In order to give a unit to another allied player, select the unit, open the Diplomacy menu, click on the 'Units' button next to the name of the ally you wish to give the unit to and confirm. The unit will immediately fall under their control and will have any orders cleared. Any veteran status the unit had prior to trading it will be lost. The only unit that cannot be given away is the ACU. It should be noted that units cannot be given to a computer player.
As each of the races in Supreme Commander and Forged Alliance have their own advantages and unique units, you can exponentially increase your power in multiplayer games by trading units with your allies. The simplest, most basic and most effective trade is to exchange engineers with a player from another faction. Since a T1 engineer can build all three T1 factories, which can subsequently be upgraded to produce T2 and T3 engineers, you can gain access to each others' entire tech trees simply by exchanging these most basic of units. Aeon and Seraphim benefit most from trading with either UEF or Cybran players, gaining access to either The Kennel or the Hive engineering stations (for which they have no equivalent), allowing them to increase their engineering power to match these factions, as well as their devastating Ravager T3 point defence and HARMS T3 torpedo systems respectively. Gaining access to Aeon technology is most valuable for allowing you to build Restorer gunships, while Seraphim tech is most advantageous for their powerful naval units and SCUs. Cybrans can also benefit strongly from any of the other factions' mobile shield generators, a unit otherwise completely lacking from their tech tree while the UEF, lacking a serious heavy-duty frontal assault experimental like the other factions, can make good use of the Monkeylord, Galactic Colossus or Ythotha. Of course, even a single T3 engineer is enough to start building any faction's experimental, which can then be built with any type of engineer, giving you access to the most powerful units in the game. Engineer trading is a powerful strategy in team games and a player with the power of all 4 factions at their command is a fearsome foe indeed.
In other situations, it can be beneficial to give units in situations when they can make better use of them than you can. Giving generators to an ally who is short of energy when you have a considerable surplus, giving units in combat to an ally for them to micromanage while you focus on a different battle, or giving your ally a factory you can no longer afford to support the production of are all viable strategies, but make sure you clear things with your ally before you do. If you do, don't forget that all orders will be cleared, including factory build queues and patrol routes, which your ally will need to reset.