It's an old question but it's worth answering. Let's break it down:
My question is actually what I need to do for my project to be
considered a webservice?
Generally, you use webservices when you want to allow interoperability (basically communication) between different platforms (for example, windows, linux, ios) written in different languages. Of course to allow this there should be a message format understood by both (commonly json or xml).
Basically you create an application (with some server-side language eg php, asp, ruby, python, etc.) but instead of returning content in html, css, and javascript, you return the content, say "raw", without any formatting. For example, you define a url ( link ), instead of returning an html page, full of css tags and styles, are returned only user data in plain text, usually json or xml. In json it could look something like this: [{nome: 'usuario 1', idade: 20}, {nome: 'usuario 2', idade: 30}]
. Instead of returning something like <html><body><table><tr><td>....
.
So when you are creating your webservice you would not be worrying about the presentation (styling), or how it will be presented to the user in an application. The client application would be concerned with how the consumed webservice data would be graphically presented. Of course the creator of webservice could very well create a client application, in html and javascript, or an android app. (native or hybrid).
For example, I created a PHP platform that queries the database
and display these data on the screen (on a php / html page) for the
depending on the request it makes. This is considered a
webservice?
No. For among other things there is no interoperability (it is even possible with much effort). If someone wants to create a native android application (written in java) to access this url, and show the content, with native elements of android (ListView, TextView, etc.) would not be easy task to receive an html document (without well defined structure, it would have to look) and look for the relevant information (the data returned by the sql query in the database, without any html formatting) in the middle of several html tags.
You could even have this page that lists the information in html, but it will be an application consuming webservice that returns only the data as it was returned by the sql query.
How do I apply REST to this? If possible, leave tutorials that teach
how to make or code snippets
No there is a good tutorial showing how to build the webservice (server side application).