I'm currently preparing an adventure in which the players encounter an earth elemental. I expect them to want to speak to it and learn about it. Afaik, earth elementals come from the Plane of Earth. But how do they get to "our" plane?
First, you're the GM, so it gets there by virtue of the fact that you said it's there. However, I think you're really asking "when my players talk to this creature, how can it reply within the standard PF rules?".
So, roughly in order of least powerful to most powerful:
- A random rift between the planes opened up, and the elemental fell through.
- Planar Ally called the creature, and it hasn't managed to complete its task, so it's stuck.
- Planar Binding called the creature, and it hasn't managed to complete its task, so it's stuck.
- Someone (probably a Wizard, for flavor reason) Plane Shifted to the Elemental Plane of Earth, and convinced (Diplomacy, Intimidate, Dominate, etc.) the elemental to come back to the prime material plane.
- Someone Gated the elemental in, or used Gate to emulate Plane Shift, above.
- An ancient Portal to the Elemental Plane of Earth is operational (but, the elemental in question can't get to it for some reason). This is on the bottom of the list because, as a permanent portal, it's really hard to make. A malfunctioning portal could do for the rift way above, though.
- Someone (again, general fluff suggests a Wizard) actually created the elemental here, so it's very technically a Native Outsider.
Of course, there are (probably) mages native to the Elemental Plane of Earth, so it may have been a local that brought the poor elemental to the Prime Material Plane.