Slates and tiles are nailed or hooked on to battens running along the roof, spaced apart according to the size of slate or tile covering them. The battens are nailed to the rafters. In old houses you’ll be able to see the battens and the underside of slates or tiles from inside the attic; sometimes it is possible to manoeuvre a slipped tile or slate back into place from within, in modern houses this won’t be possible because of the layer of waterproof felt or membrane between the rafters and the battens which helps keep wind and driven rain or snow out.
Slates are nailed in place, either at the top or about half-way down each side, and in older houses they tend to slip because the nails rust through. (Use rust proof nails for repairs.) The tool you will need for replacing slates, and possibly when replacing tiles, is a slate ripper you can buy it from a good tool merchant or you may be able to hire one.
Major roof repairs are best left to professional roofers, but an amateur who doesn’t mind heights can tackle and works safe, replacing the odd slipped tile or cracked slate provided it can be reached without difficulty. Use long-enough ladders or a working platform and if necessary a roof ladder; if in doubt, send for a roofer. Heights are dangerous.