Ok, I don't know if you are playing Ruby or Emerald, so that will effect what you need to do to get to the Team Magma hideout. I am guessing that you are playing Emerald, but I will give you directions for both games just in case.

No matter which version you are playing, you will need to head to Mt. Pyre. In Ruby, when you get to the top of Mt. Pyre, Maxie will be stealing the Blue Orb from the old couple. The old couple will then give you the Red Orb. Head to Slateport City, and talk to Captain Stern in the shipyard, which will cause a cut-scene to occur. Maxie will then steal the Captain's submarine. Now, you can head to the Magma Hideout in the cave east of Lilycove.

If you are playing Emerald, after you get to the top of Mt. Pyre, Maxie will steal the Blue Orb, and Archie will take the Red Orb. The old couple will give you the Magma Emblem. Now, head up to Mt. Chimney, and then go down the Jagged Pass. After jumping down some ledges, the screen should start shaking, and a hole should open up in the wall. This is the Magma Hideout. You will need a Pokémon with Strength to get through the Hideout.