Does your Yamaha have a "to host" connection on the back and is your computer a PC (IBM compatible) ? If so Yamaha sells a single cable that connects from "To Host) on your keyboard to the serial port (two rows of pins - 8 pins over 7 pins) on the back of your computer.
Otherwise, the CHEAPEST, QUICKEST way is to buy 2 regular MIDI cables (round, 5 pin connections at each end) AND another short cable device called a MIDI INTERFACE cable. Three items in total. The MIDI INTERFACE cable is only about 2 feet long and usually has two serial port connectors. Connect the serial connection coming straight from the MIDI connections to the serial port on the back of your computer and leave the other serial connector hanging, it doesn't connect to anything until you have another MIDI device in the future.
Connect the "out" from the MIDI INTERFACE cable to either one of the regular long MIDI cables and plug that regular cable to the MIDI IN of your keyboard. Connect the "in" from your MIDI INTERFACE cable to the other regular long MIDI cable and plug that to the MIDI OUT on your keyboard. Youre set !
Not as complicated as it sounds - just three items (2 MIDI cables and a MIDI INTERFACE cable) and they should only cost you the equivalent of about 35 or 40 dollars US. Go to a music store - electronics stores will usually sell you similar stuff that isnt really for MIDI - unless it is specified MIDI on the packaging. Good luck.