You cannot trade miles with the carriers themselves. AA will not give you a thing for your Delta miles, and vice versa.
What is sometimes done is to find someone who has the miles you want and wants the miles you have. You each get an award ticket for the other person.
As an arm's-length transaction between strangers, who find each other on eBay or through a broker, this constitutes barter and is against the rules of just about every program (as correctly posted by MeLike2Travel). If you get caught, it's bye-bye award tickets and probably bye-bye all the miles in your account as well. As a personal favor between people whose friendship predates the transaction, it's considered OK. There's a big grey area between those two ends of the spectrum.