Depends on your specs. My overclocked i5 goes up to 55ish while gaming (with a mid-tier air cooler) and that's perfectly safe. You want to start worrying at 75-80, and above 100 you could seriously damage the chip.
Same applies for GPU, but they tend to run a bit hotter.