How does net metering in California work?

Net energy metering (NEM) is an electricity buy-back program that is available from many California utility companies. If you generate more electricity than you use, the excess goes back to your utility company, spinning your meter backward and giving you a credit for the electricity your PV system generated.