You go to the Weather Institute after beating the e4. A scientist will tell you that there are droughts near either route 114, 115, 116, or 118. Look for a cave called Terra Cave, go in, and you should find Groudon. Also, the scientist may also mention floods. Go to route 105, 125, 127, or 129, and Dive into a small patch of deep water to find Marine Cave and Kyogre. Both Pokemon may change locations if you take too long to find them.