Firefighters can be summoned by using the "Emergencies" tab at the bottom of the screen. You can call a maximum of 2 fire engines at any time. Each fire engine carries 4 firefighters . They will remain on the map until dismissed.
Firefighters are at risk from prisoners. You should not call them in a riot as a area they are dealing with may be retaken by rioters. You should wait until all prisoners are back in their normal routine/locked up before you call them in.
Firemen are moved around the prison by selecting them and then right clicking where you want them to go. You can select them by clicking on the Fire Icon in a blue box on the right hand side of the screen when they are present in your prison. You can also just click on each fireman individually to the right of the fire icon.
Firemen will automatically try and put out any fires near them, however, you can direct the spray by pressing and holding H and using the mouse to indicate where you'd like the water to be aimed at.
To dismiss the firemen, click on the H at the top right of their Fire Icon in the blue box, they'll then return to the firetruck and leave the map.