Question: what to do after defeating team magma at mt pyre?
Answer: After the battles, Captain Stern asks you to help. If you say yes, he'll take you to Lilycove City where Team Magma/Aqua went. Otherwise, you can say no if you want to stay here in Slateport for now. When you go to Lilycove, go to the northeast of the city and Surf northeast.