How long does it take for you to become a citizen after marrying a US citizen?

Just because you marry a legal citizen, it does not make you a leagal citizen. When I married my husband who was a legal alien he still had to go through the same channels to become a legal US citizen and he had to be sworn in.