RSA can only encrypt data blocks that are shorter than the key length so what you normally do is
- Generate a random key of the correct length required for AES (or similar).
- Encrypt your data using AES or similar using that key
- Encrypt the random key using your RSA key
Then you publish both the outputs from 2 and 3
To decrypt
- Decrypt the AES key using your RSA key.
- Decrypt the data using that AES key