Lilycove City
Team Aqua's hideout is located near Lilycove City in the east of Hoenn. Head east from Lilycove until you get to the beach and use a Pokemon's "Surf" move to travel north across the water until you reach a cave. This is the entrance to the hideout, but two Team Aqua Grunts block the door. If you talk to them, they will reveal the location of their leader, Archie.
Slateport City
Head to Slateport City in the south of Hoenn and go to the harbor in the north of town. After you speak to the non-player character blocking the door, Captain Stern, you hear Archie speaking through a megaphone from inside the submarine at the dock. You find out that Team Aqua plan to steal the submarine.
Submarine Explorer 1
Captain Stern moves, unblocking the door so you can head through into the harbor and approach the submarine. As soon as you go up the ramp and head inside, Archie runs away, heading back to the Lilycove City hideout.
Team Aqua Hideout
Head back to Lilycove City, go east and Surf to the hideout. The two Team Aqua Grunts have left the doorway, so you are free to head inside. After you battle past an army of Grunts and Aqua Admin Matt, Archie escapes once again in the stolen submarine. You must chase him down to bring about the final confrontation.