Can I record a sound frequency I can't hear and play it back so I can hear it?
If yes, How?
This is actually really straightforward given one caveat:
Almost all professional recording software will let you frequency shift - either directly, or by speeding up or slowing the playback of the waveform. Even free software like Audacity will do this.
If you are recording ultrasonic frequencies, just slow your waveform playback down; and do the opposite for subsonics.
To expand on Dr Mayhem's great answer:
It is not possible to hear a frequency that you cannot hear.
It is possible can transform a frequency that is too high or low to hear into one that you can, and you do that by shifting the recording's frequency as Dr Mayhem describes.
You won't be hearing the original frequency, but you'd be hearing a sound at the transformed frequency that has the same characteristics as the original, which I believe is what you're looking for.
I would like to expand on the caveat in @Rory Alsop's answer, since to me he answers one part of your question (can I play it back so I can hear it?) while relegating the arguably far less trivial part (can I record an ultra/infrasonic sound?) to a caveat.
So what are the hardware/software requirements to record inaudible frequencies?
I will concentrate on ultrasound (> 20kHz) since that's where most of the issues come up and I'm guessing it's probably what you're most interested in.
So, I'm sorry to be naysayer, and I don't mean to say it's impossible, but you will need to think about these things if you want to capture ultrasonic frequencies.