While they share the word "pig" in their name, they are actually rodents. They are more closely related to other rodents like rats, hamsters, and squirrels.
The name "Guinea pig" is a bit of a misnomer. It is believed to have originated from the fact that they were first brought to Europe from South America, which was mistakenly called "Guinea" by some European explorers. The "pig" part likely comes from their grunting sounds and their appearance, particularly their short legs and rounded bodies.