The application layer provides services for an application program to ensure that effective communication with another application program in a network is possible. The application layer is not the application itself that is doing the communication. It is a service layer that provides these services:
Makes sure that the other party is identified and can be reached (Check Application Availability)
If appropriate, authenticates either the message sender or receiver or both
Makes sure that necessary communication resources exist (for example, is there a modem in the sender's computer?)
Ensures agreement at both ends about error recovery procedures, data integrity, and privacy
Determines protocol and data syntax rules at the application level