The Square Crystal is an item from Phantom Hourglass found in the Temple of the Ocean King. The item is held by a Swift Phantom on Floor B9 of the Temple. In order to acquire the crystal, Link can stun the Phantom by hitting him in his back with an Arrow. Alternatively, Link can defeat the Phantom by stepping on the floor switch at the southwest part of the room, which activates a trapped door nearby. The Swift Phantom will fall into the abyss and the crystal will be left behind. In the last visit through the Temple, Link can defeat the Phantom with a sword slash to its backside, using the Phantom Sword.
Link can place the crystal on a pedestal at the northwest corner of Floor B9. This will allow for access back down to B8 where he can bring up the Round Crystal. In subsequent visits to the Temple of the Ocean King, this is where Link can gain access to the Triangle Crystal. Eventually Link will need to carry all three types of crystals and place them in corresponding pedestals on Floor B9.
On Floor B9 of the Temple of the Ocean King, if Link places the crystals in the proper order, the elevator will activate, allowing Link to reach Floor B10. The correct order is Square, Round, and then Triangle. Each time Link re-enters the Temple of the Ocean King, the crystals will revert to their original locations.