At the start of the American Revolution, the only government body outside the individual states was the Continental Congress, originally called as an ad-hoc assembly without any authority besides what the individual states gave it. As you might expect, this started causing problems pretty quickly. The Continental Army went underpaid and under-supplied, and even things as mundane as the Continental Post Office ran into trouble. (Since Congress had no authority to define crimes, it was up to the states to prosecute highway robbery against the mail... which, often, they didn't.)
In an attempt to solve this, Congress quickly wrote a constitution called the Articles of Confederation. It defined Congress's powers against the states', but (again) there were several problems. First off, several states - unwilling to give up any power to Congress, among other reasons - refused to ratify for several years. The Articles finally entered into force in 1781, when Maryland finally ratified. (They were under threat by the British navy at the time. At Congress's request, the French navy had refused to help until Maryland ratified.) The second problem, though, was more severe: Congress still had too little power and had trouble running the government by itself. For instance, Congress repeatedly refused to let Treasurer Gouverneur Morris and Secretary of Foreign Affairs John Jay handle routine matters by themselves - and then left the problems sitting for months for lack of a quorum.
What solved these problems was the Constitutional Convention of 1787. The new Constitution (the same one in force today) gave the federal government more powers relative to the states, and established an office of President - separate from Congress - to handle executive matters himself. George Washington, elected unanimously in 1789, was the first to occupy this new office of President.
So, who was John Hanson? He was the presiding officer of the Continental Congress in 1781, when the Articles of Confederation were (finally) ratified. While his title was "President" (or, formally, "President of the United States in Congress Assembled,") he had next to no power besides being a chairman and secretary. His office shares nothing with the modern office of President besides the name.
Hanson was a Maryland planter and slaveowner, and a portrait painted during his life shows him as extremely white-skinned. I had no idea until today where memes got the idea he was black. A quick web search turns up this blog post suggesting that he might have been confused with a later Liberian black politician or that Trumbell's famous painting of the Declaration of Independence shows him as dark-skinned. However, the dark-skinned figure is actually the (also-white) Thomas Heyward of South Carolina; Hanson isn't in that picture at all.
So: There was a John Hanson, and he was in some sense President; however, he was not black.