StrategyPage ofers up an explanation of how the Somali pirates operate and are sutained in Somali Pirates And Their Aggressive Agents:
Of late, the negotiations have taken about two months, and a ransom of one or two million is usually paid. This tends to be delivered, in cash, usually via a well armed tugboat coming north from Kenya (where ports like Mombassa have banks that can supply the required amount of currency, usually, per the pirates request, in used, but recent, $50 and $100 notes). The armed cash escorts bring the money to the ship, the pirates haul it ($2 million in hundreds weighs less than 30 pounds) aboard, count it, then leave with their loot. At that point, some of the armed escorts stay with the ship as the crew fires up its engines and gets them away from Somalia.