Magic Bean

Magic Beans are a recurring item in The Legend of Zelda franchise.

Uses
The beans can be planted in soft soil. These will eventually grow into a magic plant that can transport Link to otherwise unreachable places. They can be used by planting them in mounds of soft soil which are located all over Hyrule and Termina. In Ocarina of Time, the soft soil spots only appear during the child era, so the young hero can only use them in that peiord. After seven years, they will turn into platforms which will grant Link access to certain areas otherwise impossible to reach. Some of these areas, however, can be accessed by summoning Pierre using the Scarecrow's Song.

In Majora's Mask, Magic Beans only take a bottle of water for them to fully grow. However, once Link learns the Song of Storms in the Ikana Graveyard, he can use it to water the plant and cause it to sprout. Similarly, planting beans while it is raining during the Second Day will cause them to sprout immediately. This only works in places where it is actually raining, though, which is mostly just Termina Field.

Ocarina of Time
In Ocarina of Time, Magic Beans can be purchased from a man sitting near the Zora's River who is constantly eating. The price of the beans increase by 10 Rupees every time Link buys one.

Even though planting Magic Beans in soil will help gain access to different areas, there is another use for the soil. Link can bottle some Bugs and drop them into the soil. This will result in a Gold Skulltula jumping out. This can be done even after a bean is planted.

Here are the locations of soil Link can plant magic beans in Ocarina of Time (note that, in the Master Quest version of the game, some bean beds are missing and some do not give Gold Skulltulas):

Majora's Mask
In Majora's Mask, Link can hold a maximum of 20 Magic Beans, in contrast to the ten (both the maximum and the amount available) in Ocarina of Time. The bean seller is found inside a grotto at the end of the southern inner garden of Deku Palace. Unlike in Ocarina of Time, the first sample is given for free, and subsequent samples will always cost 10 Rupees. Alternatively, Link can also purchase beans for the same price in Southern Swamp, by talking to a Business Scrub located near the entrance to the Swamp Tourist Center.