If you only need power for one or two devices at a time, only once in a while, then you are best off using an extension cord. Extension cords cost a lot less than having a permanent electrical system installed. If you have a detached garage and you plan to use an extension cord, only use those rated for outdoor use; indoor cords run outside pose a fire hazard. Compare the power consumed by the tools that you plan to run with the power that the cord can safely handle, and do not exceed its rating. Do not connect multiple extension cords together to make them long enough to reach the garage. Increasing the length of the cord decreases the amount of power that it can safely handle.
If you intend to regularly work in the garage, you will need to install permanent electrical wiring to the garage. If you have an attached garage, this should simply be a matter of extending one of the circuits already inside the house to include outlets in the garage. In this case, you will need only ordinary house wire.
If you have a detached garage, you will need underground wire. Running wire above ground would require you to find some means of running it up high, away from children, pets and visitors. This could require poles if the garage is far enough away. Even if the garage is close by, the wire would still need additional protection from the elements. Underground wire is called UF cable, and is specially designed for underground use.
Many local laws place extra restrictions on outdoor wiring. For example, many municipalities require outdoor circuits to include ground fault interrupters. If your garage is detached, make sure that the wiring system you set up for it is in compliance with your local codes.