It's really pretty simple... for most of us anyways. Unless you have an injury, a glandular disorder, severe disability, or some other physical hindrance, its as easy as diet and exercise. Sorry if you thought I was going to offer some sort of miracle workout plan. There isn't one.
The reason many people can't seem to stay in shape, is the same one that keeps them toiling at a job they hate, or trapped in a relationship they've grown tired of. They are lazy. They don't want to have to work at something continuously. The idea is distasteful. Our fascination with the lottery, games shows, jackpots, and get-rich-quick pyramid scams all hold to the same pattern of thought... which is, "I don't really wanna work..." at least not for long anyways.
The same holds true for one's own physical fitness. Every few years someone makes a few million off some new twist to a workout video, all based on that same mentality. P90X, Insanity, Jane Fonda, etc. There is nothing special about any of them. The reason people like the idea is because they fantasize that once they've completed the routine, they'll never have to exert themselves again. And therein lies the problem. Until a person changes his or her mindset, they will never achieve anything in the long term. Its the same reason why most lottery winners end up broke. They never planned for continuous success. They set themselves up for failure before they even begin.
Wanna get in shape? There are a million ways. Wanna stay in shape? There is ONE way. Comes to terms with the idea that you will have to continue exercising and eating a healthy diet FOR THE REST OF YOUR LIFE. For some people this very idea sounds horrendous. "But I don't wanna work!" Sure you can take a week off here and there. But you're going to gain a few pounds of fat and/or lose a few of muscle. That's simply how it works. Its nothing more than chemistry. Think of your body like a garden: If you continue to water it, feed it and weed it...it will generally stay pretty healthy. But if you go to all that work and then neglect it for a month, it will begin to wilt, rot, and become overgrown. Your body is not all that different. You are a composition of organic matter. While the systems that govern it can be fascinatingly complex, the material itself is fairly crude and simple.
So, are you ready? Wake up, drink some water, and do push-ups. Do as many as you can. Rest for a bit and then do some more. That's enough for now. You'll build up your chest rather fast. I promise. You might even get better results than working out at the gym. You see, most gyms are gimmicks too. There a gazillion machines isolating each muscle, but 75% of them all do the same thing. Wanna build your legs? Your own body weight and gravity provide enough resistance. Do squats. Again, do them until you can barely do any more. When you first try this, you will barely be able to walk the next day. Want a six pack? Crunches work great. Back? Do pull-ups. Get a bar or use your own door frame. Arms? Chin-ups and dips. Cardio? Take a walk. Save your money. Save your gas. Save yourself. Just put in the work. It's really not that hard once you start. Understand that getting up and starting is possibly the most difficult part. But more importantly... understand and realize that you will have to continue this INDEFINITELY. Once you get into a pattern of exercise, your body will start releasing endorphin (the world's best drug) and you will start looking forward to it. It will become a happy part of your daily routine. You will start to feel kinda grungy on the days that you are unable to get your workout done.
Wanna eat burritos? That's fine, you'll just have to walk or run twice as much. Some people love it. If you don't like the sound of the extra work, then just eat right. If you don't even know what that means, you just aren't trying hard enough. Eat less food and drink more water. Eat carrots instead of potato chips. Cookies are bad for you. There is an entire industry built around keeping you fat, so that they can sell you more products designed to get you skinny again. Break the cycle. Wake up. There is no miracle. In fact, its actually very simple.
Oh... and yes... your metabolism slows down as you grow older, requiring you to work even harder to stay healthy. Sorry about that. It doesn't get easier.
This is life. Enjoy it.