To obtain the Master Sword, you need to collect the three Pendants of Virtue from the dungeons of the Light World. Once you have all three pendants, go to the Lost Woods and use the Pegasus Boots to dash into the tree trunk. You will find the Master Sword inside.