Give Magmar a Magmarizer to hold, then trade it to a friend. It evolves into Magmortar on the other end of the trade.
The evolution is trade-triggered, so the item alone is not enough; the two steps have to happen together.