- The provider specified in the parameters is for using the reader or for reading the card, or both?
Its for using a CSP. CSP can handle hardware device but it can also handle crypto operations with private keys stored in software store like i.e. Microsoft Enhanced Cryptographic Provider does.
- Is there a generic smart card CSP publicly available or should it be tipically delivered with the smart card?
It is typically delivered with middleware of smartcard. In these days you will very often find that the middleware installs SmartCard Minidriver. These minidrivers are used by Microsoft Base Smart Card Crypto Provider. The other option is that the middleware installs whole new CSP.
- May I use other types certificates (e.g. a CA signed or self signed certificate stored on disk or USB stick)? How?
You can load i.e. a PKCS#12 file using X509Certificate2 class. Then cast its PrivateKey property to RSACryptoServiceProvider.
OK, now to the code that you referenced. This code will find first private key in default container using given CSP. You don't know what key has been found. You don't know what certificate does this key belong to. Look at this SO Answer.
I would suggest to implement basic certificate selection using X509Certificate2UI.SelectFromCollection Method. If the user does not want to you certificate available in store but instead wants to use a certificate on USB stick than give him the option to select a file and use X509Certificate2 class. Now that you have X509Certificate2 selected (in both cases you end up with X509Certificate2) cast its PrivateKey property to RSACryptoServiceProvider.