The Alien and Sedition Acts were passed by the Adams administration in response to fear that the US would soon be going to war with France. The PBS film, John & Abigail Adams, has a nice segment on these laws (I just watched this film last week - a little cheesy, but not bad and it has very good historian guests). The PBS site talks about why Adams passed these laws, which were extremely unpopular:
The pressure on Adams was relentless. The Republican press savaged him, attacking his character and his policies with increasing frequency and virulence. Abigail Adams, who supported her husband's signing of the Alien and Sedition Acts, feared for her husband's physical safety. Adams himself feared riots, and the High Federalists (the ultra-conservative wing of the party with which Adams was not aligned) feared bloody revolution of the French sort.
Abigail Adams, who was usually quite politically savvy supported these measures because she hated what the press was doing to her husband. So what did these laws say? The Alien Act tried to control the foreigners and their movements within the US - aimed mostly at the French who we were nearly at war with. The Sedition Act's goal was to control the press and their barrage of bad press against Adams. The Alien Act was never used. The Sedition Act however was used - some publishers choose to moderate their publications in reponse while others continued and were fined and arrested:
Sixteen indictments resulted from the Sedition Act, and five out of six of the leading Republican papers were tried for libel. James Callender, a journalist and a paid operative of Jefferson commissioned to smear Adams in the press, was arrested and jailed, as was Benjamin Franklin Bache, the editor of the Aurora and grandson of Benjamin Franklin.
The backlash of negative publicity from these acts as well as problems with France seriously hindered Adams' attempt for reelection in 1800. Now you might see a parallel to more modern events - some journalists have compared the Alien & Sedition Acts with with the current PATRIOT Act.