Getting back into exercise after a long absence can be incredibly intimidating. Of course, there are a number of reasons you may not have been exercising in a long time. Perhaps a family member had an illness and you were tasked with being their primary caregiver. Maybe you were busy at work, working hard to achieve financial goals you had set for yourself. Perhaps you yourself were ill, and could not or were not allowed to exercise. If you were kept from exercising for a while, it is best to ease back into it. What you want to get back into exercising is to ease into it. By easing into it, we mean both physically and socially.
There is no need to strap on a headband and jogging shorts and get out there at the beach for everyone to see, slogging through the sand while you attempt to run a 7-minute mile after not having worn tennis shoes in a decade. By the same token, you do not need to head to the gym and start benching 200 pounds when you have trouble even lifting the milk jug out of the refrigerator. Setting yourself up for success means taking baby steps. In addition to not over-doing it physically, you want to try to create a social environment that is supportive of your fitness goals.
Heading into a gym is probably not the best idea. Most people at the gym are competitive and deride those who are newcomers. It is not the supportive environment you need, but the opposite. Likewise, heading to a local basketball pickup game is probably not the best place to get back into sports- these folks love showing off on the court and often use lesser-skilled individuals to showcase their abilities. Find a class that supports your fitness goals, as well as your ability to achieve them.
What you are looking for is a group of people who want to improve their well-being, not through putting others down, but through genuine hard work and dedication. These people will help lift you up when you are feeling down, as challenges will arise. Your instructor will be critical to your success. Rather than heading into a gym alone and trying to figure to figure out what machines to use and how to use them, seek help from a professional instructor who will show you the right moves for you, for right now. As you make gains toward your fitness goals, your instructor can expose you to ever more complex moves when it is the right time for you.