Have you installed any apps recently? That's one of the biggest added annoyances of Android lately: apps can now show ads on your lockscreen but that should only appear when you're charging. You should be able to disable that in the culprit app's settings (one of the conditions to do this is that it has to be opt-in). If it's showing up also when not charging, then a 'lockscreen replacement' app might be running.