The answer really depends on what the source of the ads is.
If it's because you've installed an app that uses "push notifications" (which can make ads pop up when you are not running it, something Google are in the process of banning) then you need to identify the app responsible and uninstall it. Install an app called Addons Detector, run a scan, then see whether you have any apps using push notifications. If so, uninstall them all and the ads will stop.
On the other hand, if the ads are part of the app they are appearing in, that's the price of installing a free app - the developer has to make money somehow, and that's how they've chosen to do it. Speaking personally, I think the best solution in these cases, if you use the app regularly, is to purchase the paid version (if one exists).
There are ad-blocking applications, but they've been removed from the Play Store so you'd need to source them elsewhere. I have a feeling that the phone needs to be rooted for most of them to work (I don't actually use one, so don't know if there are any that work without root. I also don't get ads on my phone, which is also a One running 4.2.2, which is why I'm sure it's a matter of what apps you have installed rather than the phone software itself).