As Ganondorf obtains the triforce and begins to conquer Hyrule, Princess Zelda knows that Ganondorf will try to find her, in order to not only ensure her own survival, but to ensure the safeguard of the Triforce of Wisdom, she has disguised herself as a Sheikah simply known as Sheik. Zelda has used this guise to also protect her identity from Link, as she communicated to him through telepathy 7 years ago, saying to him that once he had the Ocarina of Time, she will not be around anymore.
Sheik plays the harp and teaches Link new songs to play to help him on his quest teleport to different locations. The locations are: Sacred Forest Meadow, Death Mountain Crater, Lake Hylia, Kakariko Graveyard, Desert Colossus, And the Temple of Time. Near the end of the game, Sheik uses the Triforce and transforms into Zelda. Some characters in the game and manga, refer to Sheik as a male. It is said that Zelda used the Triforce to actually become a male while being Sheik, completely sealing away the Zelda body and personality.
People rather like to debate about Sheiks true gender, it can be said for certain that Zelda used magic to transform herself but how much of herself is a big topic of discussion. The argument stems from her being reffered to as male, however the character who made this observation may have been clueless to the truth or had meerly been included to keep gamers guessing. The Smash Bros Dojo refers to Sheik as female but due to Sakurai not being included in the developement of Ocarina of Time his credidibility is doubted.
Related Threadssheik - last post by @ Jul 16, 2006
Who Likes Sheik? - last post by @ Sep 16, 2004
Sheik - last post by @ Sep 25, 2008
Sheik short-hopping useful? - last post by @ Feb 23, 2006
The Hylian Ninja - An In-Depth Sheik Guide - last post by @ Jun 1, 2009