Answering this question fairly would take volumes. In fact, volumes upon volumes upon volumes.
But we all have to start somewhere, so thank you for asking us here. You'll find quite a few of us are enthusiasts, electricians, plumbers, builders, engineers, etc. This StackExchange forum is geared towards a question or a problem for home improvement or repair, but that said, a high level answer is a good start, and your next visit might be one of upgrades vs. repairs!!
Take the Tour: https://diy.stackexchange.com/tour to get some info on how to get the best results.
A home needs to be protected from the elements, so a sound roof that can carry water off of and away from the house is vital. Windows that close and doors that close, and seal, and keep weather out is vital. Think of the area you are buying all seasons, and decide if things look durable enough for those seasons. Look at neighboring structures and see if this place is "as good" as the rest.
A home also needs proper and functional electrical, water supply, sewer/waste removal. You aren't necessarily going to 'know whats right' but you can certainly tell when something is wrong. If something breaks, ANYTHING, EVER.... fix it. If you ignore it, it will cost you more money.
For all of the things I listed above, notice that for anything that MOVES (and I do mean anything), pay attention to it it it gets weak, deal with it. If it cracks, or doors and windows dont open and close properly, address it. Be sure to close doors "with a healthy closing" and ensure the entire wall doesn't shake. If it does, it's probably "cheap".
All appliances, and furnace, fans, etc, should be checked regularly. Schedule them for cleanings on their maintenance cycle. You could hire a general contractor to do a walkthrough of your house each year, they would love to sell you something, but chances are, you'll know when something breaks.
Pay attention to creaks, definitely pay attention to drips, wet spots, and slow draining or slow water supply. Pay attention for smells of gas, definitely change filters. Wash your windows.
Always inspect your property after any kind of storm. Look for damages. Get a ladder or someone you trust with a ladder. Wash your windows at each season, and always look at areas that have caulking, or where pipes and wires enter the building.
Trim back trees, cleanout gutters. etc.
When you are shopping for a house, keep a notebook. Make notes of the things you see that scare you! Trust your eyes, your nose, etc. If you think you smell moisutere (mold or mildew), you probably do! Look for water stains and loose fixtures. Write these down, these are all things you someday may experience when you are an owner.
When you get ready to buy, take another walkthrough or two. Bring a friend that thinks they know a lot (preferrably one that does haha). But, Even if they dont - A second pair of eyes and opinions can really help spot issues. Then pay for a home inspection. It doesn't hurt if a freind is a contractor.