The name of the acts that you are referring to was the Alien and Sedition Acts. These were laws that were passed in 1798. The Alien and Sedition Acts are some of the most infamous in American history as they were aimed at reducing people’s rights based mainly on their political opinions.
In 1798, the Federalist Party was in power in the new United States. There had never been a change in party control of the government in the years since the Constitution took effect in 1789. The Federalists wanted to keep power and were frightened by the rising power of the Democratic-Republican Party.
For this reason, the Federalists passed the Alien and Sedition Acts. The most famous effect of these acts was to ban speech that was disparaging towards the government. The laws also, however, extended the time that a person had to be in the United States before they could be naturalized as American citizens. The requirement had been five years, but the Alien and Sedition Acts changed that to 14. The point of this was to keep new immigrants, who were more likely to vote for the Democratic-Republicans, from being able to vote so soon.
The Alien and Sedition Acts were repealed after the Democratic-Republicans took power in the 1800 elections.