Alignment is achieved by ‘gyro compassing’ i.e. detecting the rotation of the Earth. Levelling is achieved by the accelerometers detecting gravity to define the vertical.