Where does Photo Booth store photos and videos? I want to automatically backup photos and videos from Photo Booth to Google Photos, but don't know where they are stored.
The PhotoBooth Library is within the Pictures folder of your Home Folder.

Regarding automatic backup, there is no direct way to do it as Photo Booth does not have many options for that. You can try following:

Get Desktop Uploader app for Google Photos. Alternative way to get it is by opening the sidebar on Google Photos in your browser and clicking App downloads.

After installing the app and logging into your Google account, you can select which folders Google Photos will automatically back up. So try to 
add this path to auto backup:

"/Users/your_username/Pictures/Photo Booth Library/Pictures"

You can right-click "Photo Booth Library", and select "Show Package Contents" to see the Pictures folder, or open directly from Terminal with: open ~/Pictures/Photo\ Booth\ Library/Pictures