Team Magma's hideout is a cave located east of Lilycove City, which the player can reach by surfing. In the Pokemon Ruby gameplay, the hideout will not be accessible to the player when he first arrives at Lilycove City because the path will be blocked by two grunts. After exploring Mt. Pyre and Route 122, the two grunts blocking the path will disappear.
After exploring Mt. Pyre and Route 122, the player can also choose to explore Route 123 where he can pick up a few items like Super Repel, an Elixir, a Rare Candy and several berries. Once he arrives at Lilycove City for the second time, the player should head east until he reaches a beach and then surf further east to get to Team Magma's hideout.