Naturalization in the United States was a two-step process that generally took a minimum of 5 years. These two steps did not have to take place in the same court.
In general, after living in the United States for 2 years, an alien could file a Declaration of Intent (also called First Papers) to become a citizen.
After 2 additional years, the alien could Petition for Naturalization. After the petition was granted, a Certificate of Citizenship was issued to the alien.
See Changes in Naturalization Requirements for information on specific time periods from 1790 to present.