There are two cameras available during a race: Bonnet-Cam and Chase-Cam.
To switch to the Bonnet-Cam, expand the middle of the screen with two fingers.
To switch to the Chase-Cam, pinch the middle of the screen.
Alternatively, there are buttons to switch between the cameras. These can be found in the Pause Menu.