A processor, as the name suggests, processes personal data. The data controller gives the processor the task of processing personal data. It is the responsibility of the controller to make sure that data is processed in compliance with the GDPR. A processor can operate in a company/organization internally or it could also be a cloud service (external processor).
When personal data is collected it needs to be processed. For examples, the maintaining employee payrolls, managing business partnerships, maintaining and managing customer data, collecting email addresses for a newsletter etc.