A payment processor, quite simply, handles payments on your behalf. They avoid you having to undertake huge technical, financial and legal complications and allows you to concentrate on running your business.
For example, major card payment processors, Visa and Mastercard handle the charging of transactions from payments made on credit and debit cards, validating that the user has enough money to take the payment requested in the transaction, it’s not deemed to be fraudulent and return a result back to the requestor, whether that’s a from a card machine or online payment.
A typical online experience is:
When a user clicks "Pay", the user can input their card details, and click to proceed. At the point of the user clicking to proceed, the payment processor will check the user has enough funds, perhaps matches address held of card owner, doesn’t trigger any fraudulent or limitation warnings and if all passes, can return ‘success’ to the website, which then will complete the users order and send an email, as the funds were are able to be transferred and is on it’s way to being transferred to the merchants bank account.