First of all, rest is equally as important for your health as any sort of exercising. Micro tears and general fatigue in your muscles that results from training need time to heal in order to build strength and prevent injury. Muscles need rest to recover and repair, but how much depends on the work that you did, and what your goals are.
Overall, engaging in some sort of physical activity every day will lead to a healthier and more balanced lifestyle. What that doesn’t mean is that you should workout your biceps and triceps seven days a week and call that good. Again, your muscles need time to recover. Rotating your workouts from lifting to cardio to flexibility etc. will allow your body to rest and recover while still allowing it to continue to build strength and get into better shape. If you are focusing on strength training, make sure you rotate the muscle groups that you are training on a daily basis; legs and core one day, chest and back the next, shoulders and arms, or however you want to split it just don’t overwork the same group. Incorporating different types of training will “confuse” the body, which results in more muscle activation, burning more calories, and more strength gain.
During your actual workouts, rest is very important as well. Yet again though, depending on what your goals are and what training you are actually engaging in that rest can look very different. The main goal of rest during a workout is to replenish energy and lower the heart rate. For cardio workouts lowering the heart rate usually isn’t what you want, so keep your rest intervals short to burn the most calories. With weight training, a good rule of thumb is the higher the load the longer the rest interval. So if you are purely looking for strength building you can take longer rest periods, if you are working on muscle endurance then shorten the time between sets.
Lastly, and most importantly, if you have an injury or feel pain the best plan is to rest it and if it does not improve, talk to a professional about your options!