Depends on your goals!) If you're looking to improve strength then there's 4 key exercises that you'll need to do!
The deadlift, Squats, bench press and last but not least pullups! These 4 alone can give you a fantastic looking physique.
If you're looking to lose weight and get in shape then high intensity cardio and bodyweight movements are the way to go!
As for the exercises you'll need to avoid.. Stay away from exercises that put too much strain on your nervous system and on your joints, also try using weights that you can manage, not going too heavy
This question depends a lot upon your current physical health, and the environment in which you exercise. If you have a family doctor, or GP, then they are the best person to ask as they will know if you have an health or medical reasons to avoid certain exercises.
Once you know if there are any exercise you shouldn't do, then you should ask yourself what your goal is, and research good types of exercise for achieving it. For example cardio exercise such as swimming, cycling, dancing, or running can help with weight loss. Strength training such as weight lifting, or body weight resistance exercises (like push-ups, pull-ups, and squats) will increase muscle mass.
It really all depends on you. For exercises to avoid, it depends on your health situation. Your GP will be best able to help you tell what not to do. Also, it depends on your age. Once we reach past the age of 50, it's best to go to your GP, possibly get tested on our physical capabilities, and develop an exercise plan with them. If you're a smoker, again, go to the GP for a check-up and advice.
As for what kinds of exercises to do, it depends on what your goal is. If it's to lose weight, high intensity cardio is your best friend. Running, zumba, HIIT (high intensity interval training), swimming etc are great. For increasing strength, bodyweight exercises and resistance training (using dumbbells, exercise elastic bands, hydraulic machines etc) is best. For increasing endurance or stamina, circuit training and interval training are beat.
Figure out your goals, then do some research on workouts to do! YouTube has many fitness-dedicated channels to follow along with, as well as many sites online that outline some training routines to do. Apps on your phone are available too.