Assuming you're discussing the implementations in the TLS or SSH (v1 and v2) protocols, the difference is essentially that various forms of Diffie-Hellman key exchange (whether elliptic curve or finite field) provide forward secrecy, whereas the RSA key exchange mechanisms do not.
Perfect forward secrecy means that if after the connection, the two sides correctly destroy all the secrets associated with the connection, the connection cannot later be decrypted more easily than brute force, even if one or both of the sides is later compromised.
Essentially, with DH, both sides pick a random key pair, and in these two protocols, random salts are generated as well. In TLS, the server signs either its public key or a hash of the messages exchanged so far (depending on version), and in SSH, the server signs a value derived from the successful key exchange. In both situations, assuming the server's public key and signature are correctly verified, a man-in-the-middle attack is not possible.
Technically, TLS provides cipher suites using static Diffie-Hellman certificates before TLS 1.3, and these do not provide perfect forward secrecy. However, as a practical matter, these are extremely infrequently used. The variant which uses new keys each time for both sides is called ephemeral Diffie-Hellman key exchange, or DHE (ECDHE for the elliptic curve variant).
With the RSA key exchange used in these protocols, essentially the client generates a random value and encrypts it with the server's key. This value is used along with the client and server random values to derive the shared secrets. This does not provide perfect forward secrecy because if the server is later compromised, the encrypted value can be recovered. A man-in-the-middle attack is not possible here, either, again assuming that the server's public key is correctly verified.
As mentioned in the comments, it's possible to use an ephemeral RSA key for this purpose, but generating RSA key pairs is expensive due to performing effective primality testing. With DH, a single, secure, precomputed group can be used and the parties only have to generate a single random value within a given range. This is much more efficient and substantially faster than generating a new RSA key, in addition to being easier to verify as secure, and so everybody uses ephemeral DH instead of ephemeral RSA.
In TLS 1.3, the RSA key exchange is no longer available. The benefits of perfect forward secrecy were judged to be substantial, and only (EC)DHE and pre-shared keys are available. Similarly, in SSH v2, RSA key exchange is practically unused and DHE and ECDHE are used instead. RFC 4432 defines ephemeral RSA key exchange, but I'm not aware of any implementations which actually offer it or are even interested in offering it, and it is effectively dead.