This is more of a hardware question IMO.
Your processor is four physical cores, plus something called "Hyper-Threading," which essentially means "tell the system you really have eight cores, even though you have four." According to Intel, this results in a 10-20% performance improvement over just expressing it as four cores.
What you're seeing is what the OS sees: eight cores. Physically, it's four cores, plus hyper-threading.
You may want to see this answer on a similar question, which states:
The number of processors is basically the number of execution engines capable of running your code. One of the i5 variants is a 4-core CPU, the i5-7 series. These may be physically distinct processors (even though they exist inside the same chip) or they may be logical processors when you're using hyper-threading.