Walmart does carry heaters, but the brand(or one of the brands...I'm not sure if they have more then one) that they carry(Tetra Submersible), as mentioned by Nya and Whisk, is cheap and unreliable. Its a 'present' heater, its not adjustable, so it often under-heats though it also may potentially over-heat if you're working with a smaller tank.
What you will want to look for in a heater is something that is fully submersible and adjustable with a thermostat(though, as mentioned by Whisk, you'll always want to have a thermometer to monitor your temp.....the thermostats aren't always perfectly accurate, especially with different tank sizes).25 watts is a good size for 2.5-5 gallons, and you could bump it up to a 50 watt for 5-10 gallons.
Hydor, Elite, Aqueon, and the Petco Brand are all pretty good heater brands. I'd personally suggest staying away from Top Fin, I had a rather bad experience with a badly made one contaminating my tank a while back.
You'll know if a heater is made to work in an aquarium.....it will say on the box. ;) They're pretty easy to spot.