The Yellow Pikmin are the second primary colored Pikmin you get in both games. (Notice primary, this excludes purples and whites.)
Pikmin (1) In Pikmin, you got them in the Forest of Hope from the dormant yellow onion. These Pikmin could carry bomb-rocks, which you could use to destroy iron gates and wooden gates (though they are needed to destroy iron gates), or attack enemies. Friendly fire could also hurt your Pikmin.
Pikmin 2 In Pikmin 2, you found them in the Perplexing Pool after a very long path. You need whites to get them. Instead of carrying bomb-rocks, they instead were made immune to electricity, hence their color.
In both games, the Yellow Pikmin were able to be thrown very high, this was needed to retrieve some parts/treasures. However, just because it says that this is because they are light, doesn't mean they run faster than Red Pikmin or Blue Pikmin.