How Server request happens?
Those print() and println() are just sending text from the client to the server using the TCP/IP connection (which was setup by connect()). What's important though is that those lines of text follow the HTTP specification for request headers.

The HTTP specification defines various pieces of header information which the client can send to a server. Some of the information is mandatory, but there are lots of other optional headers too which can be helpful.

When the server receives these headers, it's nothing more than a bunch of text. There's nothing special about it. It has to assume or detect that it corresponds to the HTTP specification, and parse them appropriately to understand the details of the request. For example, the very first line specifies the resource (file) being requested, i.e. "/abc.txt".

The lines you mentioned are examples of optional information. The User-Agent header simply tells the server what kind of system and/or browser is requesting the information. In many cases, servers basically ignore this information. They might log it for statistical purposes, but they don't actually act on it. However, other servers may use it to decide exactly what information to send, e.g. showing a tablet-friendly version of a website if someone is accessing it from an iPad.

The Accept header can be used by the client to indicate what format of information it expects. Assuming the server honours it, this can be useful to ensure you don't accidentally download a format you can't handle. For example, the Arduino could happily process a little bit of plain text or HTML, but probably couldn't do anything useful with a JPG image.

For more information about the HTTP specification: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol