An application server's purpose is to host an application, to make it available to a number of clients. This usually implies (in the common sense) that the applications on the server have it's own lifecycle, and are active to maintain a program state. Numerous technologies and frameworks exists, but as you ask in a GlassFish forum, you probably want to learn about Java EE 6 and EJB 3.1.
You can of course install the application server on your desktop, the most convenient way would be to download the NetBeans IDE, which ships with GFv3.
I recommend you order a book on that topic; which one exactly is hard to answer, as we do not know your level of experience.
[Message sent by forum member 'pwn4g3']
http://forums.java.net/jive/thread.jspa?messageID=484829