My initial reply was to show you how to check that the RS232 port on your computer was working ok. To explain that a little more - with a serial connection like RS232 you have two almost completely separate devices in your computer : 1) there is the keyboard which converts key presses into RS232 signals ; 2) the display which converts RS232 signals into visible characters. The easiest way to check that they are both working is to connect them to each other. When you press a key, that gets converted into an RS232 signal as in 1) above. Because the RS232 output is connected to the input, this gets fed back into the display where it is converted from an RS232 signal into a displayed character. So in summary, if you press the 'A' key and everything is working, you will see an 'A' or an 'a' on the display.
The whole purpose of all of the above is just to check that the RS232 port on your computer is working properly.
Of course, just using the RS232 port to see characters that you are typing is pretty useless. What you need the RS232 port to do is to send characters to another device (in your case this is a switch) and to be able to see what the switch sends back to you. So, instead of connecting the computer's TxD pin to its RxD pin you connect the TxD pin from the computer to the RxD pin of the switch and connect the TxD pin from the switch to the RxD pin of the computer. Now your key presses get sent to the switch and the switch's response appears on your computer.
Unfortunately this is not all you have to consider when connecting two devices. The other main one is the speed at which the two devices expect to communicate. This is referred to as the Baud rate. Typically it will be 9600 but could be anything from 300 to 115200. Actually it could be even higher or lower but this is very unlikely for a switch. If the two devices are not set the same then you will get either nothing at all or complete gibberish. The manual for the switch will tell you what speed it uses and you can change the speed of your computer to match this.
Sorry if this is very simplistic but you seemed to be having difficulty understanding. Hope this helps. You might want to tell us what switch you are trying to connect with.