How Many Spaces After a Period?

I grew up with the idea that you always had to have two space after a period. However, the rules have actually changed. The rule for two spaces was established when people used typewriters. Now, the rule is to use only one space.