There are 2 definitions on Wikipedia.
a service offered by an electronic device to another electronic device, communicating with each other via the World Wide Web, OR a server running on a computer device, listening for requests at a particular port over a network, serving web documents (HTML, JSON, XML, images), and creating web applications services, which serve in solving specific domain problems over the Web (WWW, Internet, HTTP).
In simple terms it's just a function or app that can be accessed by other programs over the standardized web protocols (HTTP or HTTPS).
It uses XML (to tag the data), SOAP (to transfer the data), WSDL (used for describing the services available) and UDDI (used for listing what services are available).
In even simpler terms, we can say that a web service is a program that allows to talk to other web page or programs. Data can be in XML or JSON forms.
basics services web