Hi. I'm Brian and I'll try to help.
This process depends on the printer. With scan-capable printers, the manufacturer usually supplies the driver and software that allows it. For example, I own an HP OfficeJet Pro 8020. It comes with "HP Universal Scan and Driver" software that allows me to do what you describe. What printer to you use and how does it connect to your computer?