How are RSA and ElGamal compatible in PGP? I'm starting to play with PGP and I don't understand how if your key pair is RSA

you can encrypt a message for someone whose key is for example ElGamal.

How does the asymmetric key exchange work if the crypstosystems are different?
When creating a signed and encrypted PGP message, you only use your own keypair in the signing phase -- it's not used when encrypting the message (that only uses the recipient's public key). The recipient uses their own keypair only to decrypt the message, not to verify the signature. The two keypairs don't interact at all; that's why they don't have to be the same algorithm.