The answer to this is that these parties were similar to modern parties in some ways but different from them in other ways.
At the time that the Constitution was created, these parties were very informal. There was no explicit competition between the parties in the way that there is now. There was really not any formal structure to the parties. For example, there were both Federalists (like Alexander Hamilton) and Anti-Federalists (like Thomas Jefferson) in the administration of George Washington. During this time, the Anti-Federalists were more of an ideology. Saying someone was an Anti-Federalist was more like saying they were liberal or conservative than it was like saying they were a Republican or a Democrat.
Soon after Washington left office, however, the parties started to act more like modern parties. They did run separate candidates for the presidency and they did compete against one another (as in the Alien and Sedition Acts). As this happened, the Anti-Federalists came to be known as the Democratic-Republicans and were more of a political party.