Just a rought gist. Hope it's enough. Too many things to tell and google is your best friend in this case.
CPUs are overclocked through the BIOS of your motherboard.
GPUs through some software like MSI Afterburner etc.
To overclock, you'll probably have to increase voltage. Well, to overclock more than a limit, you have to increase voltage. More voltage/clock frequency means more power consumption and hence the chip *can* get harmed if you overclock toooooooooo much without the necessary cooling.