Direct deposit works by having one account, often an employer, send a payment directly to another account through electronic means. In order for this to work, the depositing account must have the routing number and account number of the account receiving the deposit.
Direct deposit is almost always done in lieu of a paper check and is frequently used by employers, the IRS, other government entities such as unemployment and investment income sources. Even though the recipient of a direct deposit might receive a paper stub of the deposit, the need for a paper check is eliminated. The lack of a paper check not only eliminates paper waste, but it also reduces the instances of identity theft through lost or stolen checks.
The benefits for the entity doing the depositing is that it makes check fraud impossible, it reduces the number of employees needed for payroll as well as the supplies for printing checks. It also reduces the workloads of bookkeeping, as well as simplifying it by reducing the amount of people handling the money.
Costs associated with direct deposit are almost always charged to the entity doing the depositing, not the recipient. Many banks encourage direct deposit from account holders primarily because of how it helps eliminate fraud.