Your phone will use a combination of sensors (such RGB and depth camera frames, accelerometer and gyroscope data) to work out how it is being moved around in physical space (called pose estimation) and render digital models that appear fixed in one location over time. ARKit and ARCore are two software packages that are getting very good at pose estimation by detecting many points of high contrast from your phone's camera(s) and tracking the movement of these points to infer the motion of your phone.