You'll need to check with your particular state, county and perhaps city. Rules vary all over. Google "Business License" or "Starting a business California". You'll probably get a link to a state website that will lead you through the process.
A couple states to the north, I needed an EIN from...