The file and rasp are used in a similar way to each other for different tasks which can lead to confusion. Whereas the file is used on both wood and metal, rasps are used mainly on wood and stone but never on metal. The file is used to shape, refine and to smooth out surfaces, the rasp is used to take larger shavings of material off. The rasp is often used to chamfer corners or remove sharp points as well as for rounding and shaping. The handle is gripped by your most dominant hand and your other hand is free to hold the end of the rasp/file for additional guidance. The main movement should come from the handle but the hand for guidance allows you to put more pressure on the file/rasp.
Files and rasps only cut on the forward stroke, so you need to remove pressure or lift off on the return stroke to avoid dulling or clogging the teeth.