After the fight with Clayton and the giant Heartless, turn around and jump to the cliff behind you—there is a tree root to land on. Go through the opening and you will arrive back at the caves.
Climb the rocks inside and you reach a hidden room containing the keyhole and a Trinity mark, which is what you need to seal the world.