There's three things to check:
1. The size of the hard drive, whether it's 2.5" (laptop-sized) or 3.5" (desktop-sized). The size of the case should match, though a 2.5" drive will fit in a 3.5" case
2. The type of connector. Unless it's an old hard drive, it's going to be SATA as that's been the standard for years.
3. What do you want to connect it to, it could be USB 2, USB 3.0, USB-C, maybe Thunderbolt or FireWire if it's a Mac.