Hold your phone flat. The green arrow points to the Kaaba; the dial turns as you turn.
NESW
On iPhone, tap "Start the compass" and allow motion access. If the arrow drifts, move your phone in a figure-8 to calibrate. Keep it away from magnets and metal.