The private key is not accessible outside of the smart card. All the cryptographic operations that require the private key are done by the smart card itself. Cryptographic smart cards are not just a dumb storage device, they are basically a computer. They have a CPU (my card has a 66Mhz 32bit RISC CPU) and normally run some simple OS. You can actually write applications that can run on the smart card using, for example, a subset of Java or the .net framework.
Edit: For example, you can view what is currently running on the smartcard: http://i.imgur.com/Pgwz4la.png or view the filesystem on the smartcard: http://imgur.com/aLsV6pf