First of all your motherboard must support overclocking.
Your success will then depend on the motherboard quality (stable voltage) as well as head dissipation. Since the G3258 is a dual-core CPU the stock cooler might prove fairly good.
Your best bet is to overclock if possible while using "CORE TEMP" to monitor CPU temperature as well as running the Intel CPU diagnostic tool:
https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=19792
I wouldn't rush out and get an aftermarket cooler especially considering this CPU was a value decision. If you do, the Cooler Master Hyper 212 EVO might be the best option. Either way, make sure fan control software is setup properly.