Choose the air compressor that you will use based on the PSI and CFM that your tool requires. Consult the packaging that came with the tool. Alternatively, if you know your air compressor's PSI and CFM capabilities, you can buy a tool that works within the parameters of the air compressor's output. Check that output in the air compressor's documentation.
Double the tool's CFM if you want to know what rated compressor you will need. For example, if the tool's CFM is 10 at 70 PSI, say for a ¾-inch impact wrench, purchase a compressor rated for 20 CFM.
Quadruple the tool's CFM if you want to know what rated compressor you will need for a tool that runs all the time. For example, if a sander's CFM is 10 at 70 PSI, purchase an air compressor that is rated for 40 CFM.