Determine Your Needs
Consider how you use the garage now and how you may use it in the future. If all you'll ever need is electricity to power lights, run a simple 20-amp circuit from your house service panel and control it via a single-pole switch in the garage.
If you will be running appliances or using tools in your garage, you have to run a bigger feeder from the house to a sub-panel in the garage.
Run the cable from your house to the garage. Use only UF (Underground Feeder) cable for smaller circuits or USE (Underground Service Entrance) cable for larger circuits.
Bury the cable 24 inches underground and run it through PVC conduit when it rises above 24 inches at the garage and house entrances. Install your sub-panel where the cable enters the garage.
Attach 6- or 4-gauge copper wire to the sub-panel ground terminal and run the other end outside the garage on the other side of the wall from the sub-panel. If the wire is subject to damage, enclose it in PVC conduit.
Find a spot with moist earth--near a downspout, for example--and bury an 8-foot ground rod there. (A rotary hammer makes the job much easier) Attach the copper wire to the ground rod with an acorn clamp.
Bury another ground rod in moist earth at least 8 feet away from the first, dig a shallow trench from the first rod to the second rod, run the cable between and clamp it to the second rod.
Wire the Garage
Use GFCI breakers for all your circuits. The only exception is if you have a dedicated circuit for an appliance such as a freezer, as long as the receptacle is inaccessible for other uses.
The minimum wiring you need in the garage is one GFCI-protected receptacle, one switch for a light inside the garage and a light outside the entrance door. Install your junction boxes where you want--a good height for receptacles is 48 inches.
Consult your local code for wiring requirements to find out whether you are allowed to drill through studs for running the cable. If allowed, drill the holes at least 8 feet above the floor where nobody will be tempted to hang tools.
Run cable through conduit if you are installing it over finished walls. Do not drill through roof trusses to run wire; run it along the top of the trusses instead.
Fasten all exposed cable with staples every 12 to 24 inches.