Is it technically possible, on a standard PC with one sound card, to play back audio through headphones while simultaneously recording different audio through a microphone?

I'd like to either find or write a program to do this if it's technically possible.