Why do my feet hurt when I do jumping jacks and box jumps etc?

One would have to. Examine your feet to answer the question. You can try looking at your feet while standing and looking in a mirror to see if you are flatfooted as the jumping may be putting additional stress on the foot and /or perhaps wearing an orthotic would take some stress off the foot during these activities.
See below. It could just be from the pressure or jarring from the exercise themselves. Try using a gel innersole in your shoe to absorb the shock.