If you are in the United States, married to a US citizen, and were inspected when you entered the country, you may qualify for a green card based on your marriage. The process, called “adjustment of status,” is relatively quick, with processing times depending on the local field office.
If you are outside the United States and married to a US citizen, you must apply for a visa at the US consulate in your country. The length of the process depends on the schedule of the consulate, but is about 12 months for most countries. There is a K-3 visa which was designed to speed up the process, but which in practice does not save much time.
If you are outside the United States and plan to marry a US citizen, you can file for a K-1 visa as a fiance. Compared the immigrant visa process, the K-1 visa is normally a few months faster, but it requires further paperwork once the fiance has entered the United States in order to receive the green card.
If you have been married less than two years at the time you obtain your permanent residence, you will be granted conditional permanent residence, which expires after 2 years. In the 3-month period before the card expires, you will need to file an I-751 petition to remove the conditions.