Is it OK to leave your vehicle running to charge the battery. It was pretty flat but jumped immediately which tells me the battery is not bad. And how long is it safe to keep it running?
Charging a dead battery using the alternator is hard on the alternator, it is best to use a Battery charger.
Alternator manufacturers know the same things about alternators that we do- they are designed to maintain batteries that are near a full state of charge, not recharge deeply-discharged batteries. We post this on message boards all the time, but there are still folks who are convinced their alternators are designed to recharge deeply-discharged batteries. We know this, because they call our tech support lines on a regular basis, because their battery keeps getting deeply-discharged (it is actually just staying deeply-discharged). The alternator manufacturers also get calls from these folks, because they've burned up their alternators, trying to recharge deeply-discharged batteries.
As Moab's answer said, the best option is to use a battery charger.
However, if you don't have time to wait for the battery to recharge:
You could leave your engine running stationary to charge your battery, but that's really inefficient and takes forever (see below). You're better off taking a long drive. It will take a while to recharge the battery; I had to do this recently, after 70 km of highway driving my battery was at 70% charge.
Starting your car takes a large amount of power, so if you only make short trips, your battery never gets fully charged.
The following section contains some average numbers, but there's a lot of variation between cars (+100%, -50%).
Alternators supply about 20 A when idle. Some of that is consumed by the car's electronics, so let's say you're supplying 10 A to the battery. An average battery (60 Ah) would then take 6 hours to charge while idling. At highway speeds, alternators can supply around 150 A, so charging is done in a more reasonable time.
The others have stated great facts however, if you needed a jump and it fired right up, I wouldn't leave the cables hooked up for more than a few minutes. You need to check to insure that your cables are clean and tight and that the ground is good wherever it leads to the frame or engine. Also check to see that your alternator is putting out/charging. You may need to run some current draw checks with your multi meter to determine if you have unnecessary current draw...