Have a plan: I don't say this because I'm a trainer and am trying to sell you on me, but there's a reason the old quote of "Fail to plan is planning to fail". If this is a new endeavor for you, you need a plan. Winging it when you have no idea where to start, what your specific goals are, or what is even possible to inject into your lifestyle is setting you up for absolute and probably immediate failure. This is not to say that you should automatically think "can't win, don't try", but write a plan and see if it's even feasible in your current lifestyle. The more chances you give yourself at success, the more likely you are to succeed.
Start slow: DO NOT use this time to try to make up for how many ever years of inaction. You will get hurt, you will get sore, and you will burn out. Start small and slow. I know motivation is at an all time high at the beginning of the new year, but motivation will not be there at the end of January or February (more on that later). When motivation is high the average gym goer will go to the gym, lift way too heavy, try out too many machines, run way too fast and spend way too long at the gym wanting to burn every calorie they've ever eaten and lose 10lbs the first day. Instead what they will have accomplished is a possible injury, fatigue, sore muscles, and frustration...all of which will keep them out of the gym the next day (due to soreness) or burnout after a week, which quickly ends the journey.
Consistency, not motivation, is key: You need to be consistent. You don't brush your teeth once a week and consider them clean. You need to have a plan that allows you to keep active most days out of the week. Taking more than 2 consecutive days off makes that 3rd, 4th, etc day of "rest" REALLY easy. Planning small & slow will help make consistency...well, consistent. You need something small, like a 10-15min walk, to keep you active on that 2nd or 5th day when you aren't in the mood to hit the gym. Not brushing your teeth one night is not great, but not detrimental. Missing day after day after day because you're too tired, not in the mood, too sore, or something unexpected comes up will cause issues. Motivation is a fickle b*tch, be consistent. Plan, slow, consistent...
Rest is important: Ironically as important as consistency is to the journey, so is rest. If you accidentally overdo it, allow yourself a rest day to recover. Your muscles need rest to grow. If you're lifting heavy, have longer rest breaks between sets. If you have a bit of soreness, use that rest day for stretching, a walk, or some yoga. Notice I didn't equate rest days to absolute shutting down of activity. Stay lightly active to stay consistent. Rest also refers to your sleeping habits. You need good, deep, restful sleep. It recharges everything and helps decrease soreness, fatigue, which would help keep you consistent.
Plan for hiccups: Life happens. Even if you plan and start slow, life will throw you curveballs. Kids get sick, work runs late, flat tires happen... a plan that allows for flexibility will only help you in the long run. This plan should be accommodating for a real life person, not a robot who is hellbent on making up for lost years due to inactivity. Can't get to the gym that night? Stretch, do some crunches, jumping jacks, bodyweight exercises at home. Take the kids or dog for a walk and create healthy habits for everyone. Got sick? Consider that rest time and plan for a slow rebuild after you're feeling better. Plan for the unexpected. Allow flexibility. The more rigid your plan and goals the less likely you are to achieve them because when the unexpected happens, you'll use that as an excuse to ditch the plan because "it doesn't work".
Have fun: Exercise and eating vegetables aren't punishments. Treating your body like crap is the punishment. Celebrate it.