I had a cousin who had to keep putting new head gaskets in her car (For some reason she just kept blowing head gaskets and replacing them, whereas if it had been me, the second time it blew a gasket, I would have just replaced the motor...) and so she ended up scrapping the car because it was too much money to fix. She bought a Ford (I would NEVER recommend that) because she heard that was a more reliable car. It all depends on the car, and your luck. My family has a bad history with Fords, whereas my Mother had 3 Buicks that ran amazingly forever, and I have had 2 Cadillacs that never gave me serious problems. (The motor fell out of the first one because it was abused, and the new one has been pretty straight forward for a $250 project car, and has been running great since I fixed the issues that are inherent in a project car.) That said, get a car you can do the repairs on yourself if possible, because 1, you will appreciate it more, and 2, you will learn so much about cars if you do your own work. I love my beat up ass Cadillac more than anyone else would ever love a new car they just paid for because 1, I paid for it myself and it has been in my name since day 1, not the banks, 2, I have paid for the repairs myself, and 3, a lot of the work I have done myself. Also, I know just what the car needs for repairs just by driving it because I have been elbows deep in that car, and recognize the different ways she "Speaks" to me.
A knowledgeable Home Mechanic can listen to a car, and it will talk back, telling you everything you need to know.
(Example: My car came back from having brake lines and hoses replaced, and the Anti-Lock warning light was still on, indicating that something was wrong in the braking system. I did a quick Brake Check and realized that car was "Pushing" to the right when I braked, meaning that one of the left brakes wasn't grabbing (The difference between a Push and a Pull is subtle, but if you experience it, you will recognize it. The push is when the one side of the car is slowing down faster than the other in this case, making the car want to turn in the opposite direction. The pull is when the car tries to steer in the one direction despite the fact that you aren't trying to steer in that direction. My car pulls to the right because the suspension is damaged, and the car PUSHES to the left because the brakes are grabbing on one side but not the other). The car still stopped fairly quickly, so I assumed that since if it was a front brake not grabbing, stopping power would be considerably reduced, it had to be my left rear caliper. I pulled it off, and sure enough, it was frozen. I replaced the caliper myself, saving the cost of having a mechanic trouble shoot the braking system and then replace the caliper. Total cost of the project: $90 for a new caliper, $30 for new brake pads, and $20 to have a shop power bleed the brakes. Cost for a Mechanic to do all that: about $250.
Also, keep in mind that if a car is not under warranty, paying the dealership to do your repairs is retarded. The Cadillac dealer wants $600 a shock to repair the rear Air leveling suspension on my car, plus about $400 in shop time. NO ONE IN MY TOWN will touch this car's rear suspension. My option? Pay $200 for a conversion kit and put Non-Leveling shocks in the rear and front end myself, and save over $2,000. How hard is it? Fairly straightforward, and Incredibly Fucking easy for me, since I have experience doing that sort of thing. Could you do it? Absolutely!
Also, my Air Temperature Charge Sensor, which measures the temperature of the air going into the cylinders so the car knows how much fuel to add, went bad some time since the motor was put in. The car idled roughly and wanted to stall out when accelerating from a dead stop. It was a $15 part and a five minute repair. Only I couldn't find the fucking thing because Air Temperature sensors are NORMALLY in the intake, not the Heads, but alas, my car has it in the head. I found it with help from people on a Cadillac Forum, installed it in five minutes, and my gas mileage went up 5 MPGs on the spot. A mechanic would have needed at least $50 because they would have had to charge you for pulling the car into the garage, installing the part, the cost of the part itself, then testing to be sure the new part worked once it was installed (which involves an Ammeter and testing electrical connections). Also, your mechanic would hate you if you came to him for every piddly ass job that you should be able to do yourself. He doesn't make any money off a ten minute job, because he has YOUR car in the bay when idiots who need a new motor could have their car up on the lift instead. Also, Brake pads, oil and transmission fluid changes, and radiator flushes need to be done at regular intervals, depending on your car. My 'llac has a sensor that tells my instrument panel when to get an oil change. Yours won't, so knowing how often to change the oil is important to you saving money on the repairs and fuel mileage. Most cars don't need oil every 3,000 miles, but you MUST replace the oil at 1,000 original miles because there is special break-in oil in the motor when it comes out of the factory that will damage the engine if it is used for longer than the recommended mileage.
Also, DO YOU EVEN KNOW HOW TO BREAK IN A BRAND NEW MOTOR? I will bet that 100% of the people who have gotten this far into my text wall did not know that there are special techniques used to break in a car motor, and that the type of fuel you use will determine how the motor runs for the rest of the car's life. Which technique you use and which gasoline you use will determine how much of your car's full potential will be reached upon being broken in. Lower quality gasolines are cheaper, but they don't burn as well, so they reduce your fuel efficiency, and decrease the life of your motor. Always use Top-Tier gasoline, even if you are only putting low-grade octane gasoline in your car.
I have had cars that ran best on mid grade, and cars that ran best on low grade, and of course the 'llac has a high compression motor, which requires Premium to run properly. I also found that certain gas stations use a different type of gas that makes the car run worse or better, depending on where I go. BP has always had great gas, but is it worth the ten cents per gallon extra? Nope. I have a gas station that offers 92 octane Ethanol fuel that makes my car run better than the gas I used to use that was 91 Octane without ethanol. And, because it has ethanol, it is actually 16 cents cheaper per gallon than the BP gas, which is the most expensive in town. (For those that don't know, BP is one of Brand Name stations that offer Top-Tier gasoline, and the only Brand Name gas station in town besides Philips' 66, which is the station I used to use.)
Also, if you get a low-displacement Turbo motor (A lot of car companies are doing this these days to improve fuel efficiency) things will get WAY more expensive, and you won't even realize it. First, you HAVE to run premium gasoline on a turbo, otherwise you will blow valves and heads due to premature detonation. Also, if you ever get in the mood to Rev the motor up, you will have to wait for the turbo to wind down before shutting the motor off, because the turbo generally (not a rule, but a basic rule of thumb) spins at roughly 3 to 6 times the RPM of the motor. If your car idles at 800 RPMS (A pretty basic idle speed), the turbo is spinning at about 3,200 RPM. If you rev the car to redline at 6,500 (Also a pretty standard top rev line for a motor) now your turbo is spinning at 19,500 RPM! If you shut the motor off without allowing the turbine to spin down (generally a two or three minute idle is recommended) and your car doesn't have a special oil pump for the turbo(Not usually a stock option on Non-Performance models), when you shut the motor off, your car will not be pumping oil to that expensive turbine that is now spinning at high speeds while unlubricated... And I promise you, a turbine is NOT covered under warranty.
TL;DR: If you don't know about cars, join a forum of vehicle enthusiasts that specialize in your car's brand. They will help you learn what you need to know about driving your car. I have a membership to a Cadillac Forum that has helped me save time and money on my Do-It-Yourself repairs. Also, it turns out that my Romp on the throttle and accelerate to speed rapidly, then cruise until you need to slow down driving technique that I figured out on my own is actually THE RECOMMENDED DRIVING STYLE FOR MY CAR! My car LIKES to be flogged. It suits me to drive this car as if I were a street racer... Oh yeah, I AM a street racer. Now I am off to own the face of some punk kids in their "Fast" Civics...