It's a 10 day waiting period in California. To purchase a handgun, you first have to take a written test and obtain a basic firearms safety certificate. I believe you now also have to sign a waiver stating that you own a gun safe approved by the State.
Definitely take a class first.