This "output" is in the very popular, common, industry-standard JSON format. Basically, it's a universal type of way to output data that almost any technology platform should be able to read - for us, we want our mobile apps reading it, so they know what images and text to display inside the mobile app.
A simple definition: A web service is a function that can be accessed by other programs over the web (Http). To clarify a bit, when you create a website in PHP that outputs HTML its target is the browser and by extension the human being reading the page in the browser. A web service is not targeted at humans but rather at other programs.
So your PHP site that generates a random integer could be a web service if it outputs the integer in a format that may be consumed by another program. It might be in an XML format or another format, as long as other programs can understand the output.
At ThinΛpp, we take web services very seriously. Our approach is to typically base our own platforms around RESTful API styled web services. It's a very PHP driven, secure way of outputting data (for the mobile app to scoop up).