Sata2 is the 2nd gen interface and Sata3 is the 3rd gen interface.
Sata3 allows higher transfer speeds than Sata2, but IIRC, mechanical HDDs aren't fast enough to take advantage of those higher speeds so it makes little difference.
They are compatible though, you can use a Sata3 HDD in a Sata2 port, and vice versa.