Several types of Gates exist in Skylanders: Spyro's Adventure, which all have a different way to open them.
Gates with keyholes in them. They require one or more keys to be opened. These keys are often found nearby and usually require some puzzling to obtain.
Elemental gates are huge transparent spheres that can only be opened by a Skylander of the same element. After they are opened though, any Skylander can pass through them.
Guarded by monsters, these gates will open after the monsters guarding them have been defeated.
In order to open a puzzle gate, the Skylander must solve a puzzle hidden inside the lock. This involves moving a Lockmaster Imp around inside the lock to land them on top of the pink tumblers. If all are hit, the gate unlocks.
In Darklight Crypt, a fire ghost version of the imp appears inside the same lock. It moves slowly when the Skylander rotates it and if it hits the normal imp, the puzzle fails and has to be started over.
A gate that can be opened by using a switch, moving into a certain area, or due to some other gameplay event (like a cutscene).
While technically not gates, these walls function similar to gates in the sense that they block the path and can be opened. This can often be done simply by attacking the wall, but on occasion, something stronger is needed, like a bomb or a cannon. This is indicated by a purple bomb or cannon icon in front of the wall.
A type of gate unique to Perilous Pastures, this gate will only open after all the locks have been blasted off using a nearby turret.