In modern terminology, William Walker would be known as a mercenary. In the mid-19th century, he was an American citizen from the south who promoted many schemes and plans, most of which were seen as ridiculous by his contemporaries. Many dismissed him as a lunatic, but he made himself into a dangerous one, rather than being content to be a garden variety lunatic spouting tirades from his back porch.
Walker assembled his own mercenary army of about fifty men. With this army he made known his desire to conquer Mexico and Central America and then force the United States government to annex them as a slave state. An unapologetic supporter of slavery and the "southern way of life," Walker conceived his plan as a way of insuring that abolitionists would never eradicate slavery. He received financial backing from unnamed sources in the United States to execute his plans.
Walker planned several invasions of Mexico, yes, with fifty men. Finally, he made his move, attacked and was captured by the Mexican government who later released him into the custody of the United States. In 1854, he was brought in by one of the factions involved in the civil war in Nicaragua to help them train and fight. He managed to take control of Nicaragua for a while, but then was driven out as he openly promoted the idea of turning Nicaragua into part of the United States as well as noting it had a rich supply of slaves already in the country.
His attempted invasion of Costa Rica was foiled when unarmed civilians burned down the inn he was staying in with his men, which at this point consisted of a small group of Nicaraguan exiles. After being driven out of Costa Rica, he attempted to invade Panama, but again failed and was sent back to the United States. Once free again, he returned to his schemes, and launched an invasion attempt of Honduras. There he was captured for the last time. The Hondurans, knowing William Walker well from his reputation, chose to summarily execute him rather than see him released once again.