Bottles are used to store items. They are present in several Zelda games.
Bottles have been a staple item in most Zelda games since A Link to the Past. You could use bottles to hold potions or fairies inside them. You usually obtain one from the main quest, and the rest must be obtained through side quests.
Potions can be stored inside your bottles for later use, they have multiple uses, all of them restorative.
Fairies can be held in bottles as well, and releasing them has the effect of them using their healing magic on Link.
You can hold odd things in bottles that ARNT exactly meant to be... healthy. In Ocarina of Time, you can hold bugs in bottles and release them in certain areas to obtain rupees or Gold Skulltullas You can also store poes, which can sold to a certain man. Or you can try to eat them, they usually hurt Link, but sometimes heal him.
In Ocarina of Time, when fighting Ganondorf your supposed to use your sword to bounce back the energy balls he throws at you. However though, you can also use bottles to bounce back the lightning balls as well if you feeling daring enough.