Depends a great deal on the county you live in. The CA Secretary of State lists at least 6 different voting systems used across the 58 counties of CA.
Once your ballot is cast, counting also depends a great deal on the voting system used. Again from the CA Secretary of State (abridged)
Before or as soon as the polls are closed, unless otherwise directed by the county elections official, the precinct board shall remove the voted ballots from the ballot container and take them out of the secrecy envelopes or detach them from the secrecy stubs. After completing the foregoing step, the precinct board shall count the number of ballot cards in each group, and certify the number of ballots cast on the voting roster.
The precinct board shall group voted ballot cards and voted separate write-in ballots, as directed by the elections official, and place them in containers. The board shall also place spoiled and void ballots, if any, in containers as directed by the elections official. All of these ballots, along with the containers for voted ballot cards, shall be placed in one or more boxes, which shall then be sealed and delivered as soon as possible to the receiving centers or central counting places with the unused ballots, supplies, and other materials as directed by the elections official.
If votes are cast by means of a voting machine, as soon as the polls are closed, the precinct board, in the presence of the watchers and all others lawfully present, shall immediately lock the voting machine against voting and do all of the following: (1) Count the votes cast on voting machines and report the results. (2) Complete, sign, and return to the elections official all furnished forms requiring its signatures. When votes are counted on one or more voting machines at the precinct, all members of the precinct board, upon the completion of their duties, shall sign a certificate of performance.