you cant "unlock" it, it is part of the storyline.
the cave of origin is only in ruby and sapphire and emerald.
in sootopolis
sootopolis
Groudon is in the Cave of Origin, in Sootopolis City. Only in Ruby version. Kyogre is in the Cave of Origin in Sootopolis City, in Sapphire only.
You cannot get Kyogre in Ruby. You can only get Groudon in the Cave of Origin.
sootiplas city
Sootopolis City
In the Cave of Origin.
Sootopolis
In sootopolis's Cave of Origin
on the left side of sootipolios city
go to the cave of origin