How does Diffie–Hellman differ from elliptic curve Diffie–Hellman? I didn't understand how ECDH actually works. Disclaimer: I know very little about elliptic curves.

Here is how DH works:


Alice and Bob agree on a prime number $P$ and a generator $G$. (They use one from RFC 3526)
Alice generates a long-enough (how long?) secret $S$ and
calculates $R = G^S \pmod{P}$ and sends the result $R$ to Bob
Bob does the same that Alice does in 2.
Alice and Bob exchange the values of $R$
They both calculate $R^S \pmod{P}$ with the value send by the other party, and find the same value $SS$.


$SS$ is the Shared Secret.

How do points 1..4 differ when using elliptic curves?

What are the "equivalent" values of RFC 3526 for EC?
You might want to checkout Wikipedia page of elliptic curves to get a basic overview.
The difference between DH and ECDH is mainly the group which is being chosen to compute the secret key(s). While DH uses a multiplicative group of integers modulo a prime $p$, ECDH uses a multiplicative group of points on an elliptic curve:

Alice and Bob agree on an elliptic curve $E$ over a Field $\mathbb{F}_q$ and a base point $G \in E/\mathbb{F}_q$.

Alice generates a (random) secret $k_A$ and computes $P_A = k_A P$.

Bob generates a (random) secret $k_B$ and computes $P_B = k_B P$.

Alice and Bob exchange $P_A$ and $P_B$.

Alice and Bob compute $P_{AB} = k_a P_B = k_b P_A$.
The secret $k_A$ and $k_B$ is a random value $\in \{1, ..., n-1\}$ where $n$ is the order of the group generated by $G$.


The equivalent RFC may be RFC 4753 (not sure, not into RFCs at all).
To agree on a common curve Alice and Bob may either generate a curve them selves or use predefined curves and base points. For this there are a couple of standards defined, see:

Brainpool
IEEE P1363
NIST
NSA Suite B
ANSI X9.63
...

Depending on application for ECDH you might want to choose different curves since some curves have benefits, for example amount of calculation steps for point multiplications.