A microservice is a small, independent service that performs a specific function within a larger application. It is designed to be loosely coupled with other microservices and can be independently deployed and scaled.