Essentially, he just sailed away. He wasn't actually a prisoner on Elba, per se; he was exiled there, but allowed to keep his imperial titles and a small military force as his personal guard. He was also given sovereignty over the island, and ruled Elba for 11 months — albeit under the watchful (but not watchful enough) eye of the Allies.
This is from the Dictionary of National Biography entry for [Sir Neil Campbell](http://en.wikisource.org/wiki/Campbell,Neil(1776-1827)_(DNB00), the British commissioner at Elba:
[Campbell] accompanied Napoleon to Elba with the express orders from Lord Castlereagh that he was in no way to act as his gaoler, but rather to put the late French emperor in possession of the little island of which he was to be the sovereign prince. [...] At Napoleon's request, however, Campbell promised to make Elba his headquarters until the termination of the congress of Vienna, and it was the supposed residence of the English colonel there which put the English naval captains off their guard, and enabled Napoleon to escape so easily.
Bonaparte's eventual escape in February 1815 wasn't especially daring. He chose a moment when the Royal Navy, which was tasked with guarding Elba, was otherwise occupied, boarded a small ship and set off for France, landing on the Côte d'Azur two days later.
Here's the account of his return to France from Frank McLynn's popular biography:
Napoleon chose carefully the moment when he made his bed. On 16 February Campbell left Elba for a medical consultation in Florence on board the Royal Navy brig Partridge, which normally invested the island. Next day the Emperor ordered the brig Inconstant to be fitted out for a voyage. Men, arms and ammunition were loaded on to six smaller craft. On 26 February Napoleon bade farewell to Elba. He took with him 650 men of the Guard, just over a hundred Polish lancers and some Corsican and Elban volunteers. The journey across the Mediterranean was risky, for with favourable winds the Partridge could have got back from Leghorn in time to intercept the Inconstant. But Napoleon's usual luck when at sea held. The only encounter with hostile shipping was with the French brig, the Zéphyr. The two ships hailed each other, but the Zéphyr's captain was lacking in curiosity and was satisfied with the casually imparted news that the 'great man' was still on Elba.
— Frank McLynn, Napoleon: A Biography (1998), 604.
Edit: grammar.