Three roles in an online shop

A module groups related code, such as pricing rules. A component is a part with a defined job, such as a checkout form. A service does work for other parts, such as processing payments through an API.

These parts can run in different places: pricing on a server, the checkout form in a browser, and payments on another server. Their names describe their roles, not their locations.

Names vary by context

The boundaries are flexible. A component may be a button or a large part of the system. Ask what each part does, how others use it, and whether it can run or be updated separately.