If you’ve got a Walmart bike, then the problem is….it’s a Walmart bike, and you need to just break down and spend some dough on a better one. If you’re riding a Raleigh touring bike, then something has become misaligned/needs recalibrated or something that a bike shop would have to fix. Those gears and deraileurs are semi-precise devices and are tough to work on unless you know what you’re doing. Had the same problem, until I got my Raleigh ;)
Edit- and I say ditch the cheaper bikes just because there’s not much you can do for them, low quality is low quality. If you install a better deraileur it’s not going to do any good if the gears are slightly bent or the bike frame isn’t straight.