Yeah, you'll need midi cables that have "ends" that look like this:
You can even get cables with a direct connection to the PC without needing a USB interface. Like...
But I'm with ddw4e, I prefer USB interface. I've used one of these before & does a decent job:
As for free midi recording software I think you can give Audacity a go... But don't quote me on that.