It depends on make and model of all parts concerned.
First thing is to provide better than stock cooling. Basic OC would be to raise CPU multiplier where possible and adjust voltage as needed.
There's no universal formula and differences may also go as fine as particular part used even if it's designation is same as other ones.
Overclocking is really a difficult thing to do but im still going for it. One question though, do i need to overclock my cpu if i buy a 2300mhz ddr4 ram?