I am unsure what CPU an d motherboard to get which one is better for overclocking , gaming and evryday school work
CPU Intel Core i5 4670K
Motherboard ASRock H87M Pro4
or Ivy Bridge
CPU Intel Core i5 3570K
Motherboard ASRock Z77 Extreme4
If you wanna overclock, I'm pretty sure, you need to go for a Z-model, so take a Z87 instead of a H87 for the i5 4670k.
I know ASRock did something to a H87 chipset, so it could overclock, but I would personally rather go for a Z87.
If you don't have the Ivy Bridge, I would say go for the Haswell - price different cant be that much and then you'll have the newest gear out there...
It usually tends to be best to get the latest update from Intel. However, the difference in performance between these two is quite small and you'll get a better overclock with Ivy Bridge, most likely. Unless you plan on upgrading to Broadwell when it's released, I'd go with whichever is cheapest. Bear in mind that with an H87 motherboard you cannot overclock - it must be a Z87 motherboard. Something like the Asrock Z87 Extreme4 or MSI Z87-G45 Gaming are excellent choices.