A web service is an application that provides services to consumers (web applications, thick clients, other services, mobile apps, etc.). Those services may provide data, perform some calculation or just about anything other than providing a UI. Thus, it will have a clearly-defined API which consists of providing responses to requests made by a remote application.
Don't confuse with web-application. Web application does have GUI intended to be shown in web browser.