PSTN to PC all you need is a voip capable router connected to the PSTN and a PC.
You can use any old H323 client on the PC to place calls( you can find these for free around the internet).
for PSTN to PSTN, you will need to voip capable routers with the appropriate voice interface cards/modules and a connection between them that has QOS.