Banner Grabbing is used by hackers to identify target system based on the service and then hackers use service or system specific methods (or exploits) to attack the target. For example if a system is running IIS, it is definite that it is running on Windows. Now as the hackers know the target is Windows they concentrate on methods of compromising Windows operating system.
The simplest way to grab the banner is to telnet the server on specific service port number like HTTP (Port 80), SMTP (Port 25), FTP (Port 21), SSH (Port 22), Telnet (Port 23), etc.
In this article the example shown was performed using TELNET command line utility, however tools also exist to perform banner grabbing.