PARTIES: ORIGINS | nationalsalvation.net
The Federalists were called Federalists because they were tied to Washington, whose reputation got the Constitution ratified.
They substituted a Federal system, with a strong central government, for the Confederation, which had practically no central government.
As the Federal Government got stronger the word "federalism" became more and more just a reminder that the states ALSO had rights.
So the old Federalists like Alexander Hamilton who wanted nothing BUT a central government became Abraham Lincoln's Republicans, who destroyed federalism altogether.
The Whigs were called Whigs after the Revolutionary Whigs who opposed the monarchical Tories. The party took that name as opposing the "monarchy" they said Andrew Jackson was trying to impose.
The Democrats have that name simply because Jackson gave it to them. In over seventeen decades, that party has had nothing in common with the original party but the name.
The original Republican Party, the Republican-Democrats, was the name given to the anti-Federalist party by Jefferson.
Jackson claimed his party was truly Jeffersonian.
The original Democratic Party opposed a national bank and other centralizing measures Hamilton and Lincoln wanted, so it was actually anti-Federalist, in the later meaning of that word.
A more general answer to your question goes back to a point I keep making, and that I hope will not die with me: When someone declares he is anti-Hate, you know that he considered Hate to be prime motivator. He is a Hater.
When someone freely accuses everybody of lying, he considers lying to be a natural action, and he is a liar.
The Hamiltonians and Lincolnites wanted ONLY a central government, but in order to get started they needed a central government to start with. So they got the Constitution by guaranteeing states' rights.
They got the name "Federalist" from that. But they were not Federalists, they were centralists.
A party gets its name from the FIRST step.
The Whigs were Hamiltonians opposing Jackson's Jeffersonians. Their first step was to drive the Southerners under Jackson out of power.
Then they could continue the Hamiltonian program of destroying the states altogether. To achieve this first step, they called themselves Whigs, dedicated to overthrowing Jackson's "monarchy."
But it was so they could set up a centralized monarchy of their own. Lincoln did that.
Sometime you should write on why the anti-federalists were called Federalists, the anti-whigs were called Whigs, the anti-republicans were called Republicans, and the anti-democrats are called Democrats.