You can find some background on the complicated relationship between the indigenous peoples and the colonial powers (Britain and France) here by u/enygma9753. It will provide context to their situation in 1775 and 1812.
This is huge question that needs to be broken up into chunks, as both the indigenous people and blacks had their own motivations for taking up arms on the British side.
Indigenous peoples
Colonial settlers had been encroaching on native lands aka territory west of the Appalachians, the Ohio Valley since after 1763, when Britain set a Proclamation Line that was supposed to be the boundary of white settlement. The American settlers from the frontier states didn't abide by this, as they were motivated by the constant need for fresh soil for farming. This put pressure on the native peoples, who had been assured by Britain that this was to be "Indian Territory".
When war broke out in the Thirteen Colonies, many native peoples allied with Britain in the hopes that they could expel the American settlers and safeguard their lands with British help. Some natives, a minority, sided with America after negotiating a separate peace with state officials. Westward expansion continued, and conflict between the settlers and the native peoples continued. It was frontier war, with a high level of animosity and mistrust on all sides. Each side would raid and burn each other's settlements on the frontier. Atrocities were committed by all sides. Britain continued to provide supplies to the native groups in the region -- they wanted a buffer zone of Indian territory to separate the expanding American nation from their vulnerable colonies in Canada.
During their raids on native villages, American settlers would find supplies and even arms originating from Britain. This inflamed anger towards Britain in the frontier states. When America declared war on Britain in 1812, the most vocal supporters for war were the congressmen from the frontier states who wanted to expel British influence from the frontier, seize the Indian territory and if possible capture Canada -- either as a bargaining chip to bring Britain to the negotiating table, or to absorb it entirely as part of America's continental expansion. This was their intent, even though it wasn't formally in the reasons listed (naval impressment and neutrality rights) in the declaration of war.
Tecumseh, the charismatic leader of the pan-native alliance in the frontier, had fought the Americans for some 20 years by 1812 and saw British assistance as the only, and perhaps last, chance to preserve the dream of a native homeland. He found a like-minded ally in General Isaac Brock, commander of British forces in Upper Canada.
The British needed native alliances in Canada to supplement their meagre forces in the colonies and they couldn't spare reinforcements while fighting a total war against Napoleon. Colonial authorities had little choice but to fight a defensive war for the first two years. Only after Napoleon's abdication in 1814 could they pursue the war more aggressively.
Together, they scored bold, lightning victories against the Americans in 1812, with the capture of Detroit as a significant success. But Brock's death at Queenston Heights later that year, and Tecumseh's growing dissatisfaction with British leadership and efforts the following year (culminating in his own death in the Battle of the Thames), would end the cause of a native homeland.
The peace treaty at Ghent ignored native grievances and American westward expansion continued unimpeded. The British and the US regarded the War of 1812 as a draw, but the native peoples were the clear losers in the conflict. They had lost everything.
(If I'm able to cover the side of free blacks and slaves later, I'll try.)