The car's computer drains some voltage even when the car sits. But the amount it uses is in the milliamps i.e., very little, so the car should be able to sit for a few weeks before it drains the battery too much. If the car is driven every day, the alternator is recharging this tiny drain so it may never be noticed at all. But even if it is driven often, the constant (and unavoidable) draw might be just enough to finish off a weak battery.
Anyway, there are a couple things to try to help the battery-voltage-draw problem, 1) install a battery shut off switch under the hood or 2) use a solar battery trickle charger on the dash to keep the battery charged up (if it is parked outside of course).
But from what you are saying, sounds like the other people are right and the battery or alternator are going out. You can find out yourself very cheaply which one it is and save yourself a visit to the shop too.
You would need a volt ohmmeter (sometimes called multimeter) for a simple test you can do yourself. A cheap one is just fine. (the one in the picture is $10 from Sears). To use it, just hook up the leads to the VOM and set it for VDC (volts DC).
(It look complicated but isnt, because we are only using it to check voltage. For example on the multimeter in the picture, you can see that "VDC" is at the lower part of the adjustment switch, and you can see the "50" setting at 6 o'clock position on the dial. And that is what you would use to check your battery ( 12 volts being >10 and <50).
(BTW, remember a battery is
direct current (DC) and by contrast house current, for example, is ALTERNATING current (AC) so for a car we use the DC setting)
Well anyway thats about all you need to know about multimeters for what you want to do. So now, you can use your new toy to check the battery voltage with engine off. 12.6 to 12.9v is acceptable range. Any lower than 12.6 your battery's probably due to be replaced pretty soon. Voltage lower than 12.4, older than 2 or 3 years and wont hold a charge, its a door stop. (This info is for lead-acid batteries remember, if you have an Optima battery or some such gel type, the charging and testing procedure is different so most of this info does not apply to you - )
You can also buy a cheap hydrometer to check the acid in the cells, (although the voltage check will usually tell you all you want to know). The hydrometer will tell you if you have one or more dead or dying cells or if the battery is in good shape.
If the battery is ok, just start the car. Allow it to idle for at least 3 minutes (to replace the juice the battery took to start the car).
Put the probes on the battery now. You should get a reading of at least 14.0 volts. (Acceptable range 13.8 to 15). If it is low, check the belt tension, tighten if needed. If the belt is fine, remove the alternator and take it to the auto parts and have it tested, replace if needed.