Before the United States Constitution, there was the Articles of Confederation. This was the first constitution for the United States, but was also very weak and gave little power to the federal government. Under the Articles of Confederation, the government could not tax the states, regulate trade, draft soldiers, or even create and enforce laws properly.
Anti-Federalists were people who supported the Articles of Confederation, as it gave most of the power to the state governments and not to the federal government. They wanted to keep the power in the hands of the state governments, as many were nervous that the federal government would abuse their power if they obtained it.
Federalists were people who opposed the Articles of Confederation, as they felt it was very weak and more power should go to the federal government. They believed that the Articles of Confederation was harming the country, as it was drifting the country apart and essentially making it weaker as a whole. They wanted the federal government to have more power.
Eventually, the Constitutional Convention of 1787 occurred. While the original goal was just to amend the Articles of Confederation, this did not happen. The Articles ended up getting scrapped altogether and the United States Constitution was created instead, the one we still have today. The Anti-Federalists only agreed to this if a Bill of Rights was added, which would protect the citizens if the government tried to abuse their power. While the Federalists did not necessarily agree that they needed a Bill of Rights, it was added anyways to ease the mind of citizens.