VTY lines enable remote access using Telnet or SSH to the device. Many Cisco switches support up to 16 VTY lines that are numbered 0 to 15.
If you want to secure Telnet and SSH sessions for CISCO devices with password "cisco", the configurations are following
Sw-Floor-1>en
Sw-Floor-1#
Sw-Floor-1#config t
Enter configuration commands, one per line. End with CNTL/Z.
Sw-Floor-1(config)#line vty 0 15
Sw-Floor-1(config-line)#password cisco
Sw-Floor-1(config-line)#login
Sw-Floor-1(config-line)#end
Sw-Floor-1#