Buy a reliable cheap car that's easy and cheap to maintain and repair. Pay it off as quickly as possible and run it for 10+ years. Your operating cost per mile over a vehicle lifetime like that gets measured in fractions of a dollar per mile.
My almost 13 year old car costs me something like <$.30/mile right now and getting cheaper the older it gets. So far, I've never had a repair that cost more than $300 and gas mileage is comparable to some hybrids. It cost me $12k new and I paid it off in 2 years so my actual purchase cost was something a bit higher, but I didn't let the financer recoup even half of their expected interest off of me.
In theory, leasing should be much better, since cars don't appreciate in value, negating one of the advantages of owning. In practice, lease prices are so high that it seldom makes sense to lease.