You need to bring the Jade Orb to Embedded Tower.
To get the Jade Orb, the player must show Professor Oak a Groudon from SS and a Kyogre from HG (any migrated Pokemon will not work). Once you have the Jade Orb, bring it to Embedded Tower and fight Rayquaza.
To get Kyogre and Groudon, the player must talk to Mr. Pokemon after getting the National Dex and a Kanto starter. In SS, you will get a Red Orb, which allows you to see Groudon in Embedded Tower. In HG, you will get a Blue Orb which allows you to see Kyogre. You will have to trade to get both Pokemon in the same game. Once they are both in your party, Professor Oak will give you the Jade Orb. Remember, the Kyogre and Groudon must be from HG/SS, and any Pokemon received otherwise will not be accepted by Oak.