Web Server -
Server on which your website is hosted. This server will have installed web servers such as IIS, apache, etc.
Application Server -
Server on which your created applications which are utilizing your database, web service, etc. This application server will host business layer (wrapped with web services), scheduled jobs, windows services, etc.
Database Server -
Database server will have your one or more database hosted such as Oracle, Sql Server, MySql, etc.
If you are referring to
htdocs then it is a Web Server. The database you are using is must be installed on different server which is your Database server. Application server can also be installed on the same web server machine.
Reference - Deployment Patterns