Pemex (the government petroleum monopoly) franchises all of Mexico's gas stations, which you'll find at most junctions and in cities and towns. Gas is measured in liters, and stations usually don't accept U.S. or Canadian credit cards or dollars, but this is beginning to change. Fuel prices tend to be about the same as in the United States.
Premium unleaded gas (called premium, the red pump) and regular unleaded gas (magna, the green pump) are available nationwide, but it's still best to fill up whenever you can and not let your tank get below half full. Fuel quality is generally lower than that in the United States, but it has improved enough so that your car will run acceptably.
Attendants pump the gas for you and may also wash your windshield and check your oil and tire air pressure. A small tip is customary (from just a few pesos to 5 or 10). Keep a close eye on the gas meter to make sure the attendant is starting it at "0" and that you're charged the correct price.