Injury prevention is commonly overlooked and not touched on enough until AFTER you are hurt. This is so fitting being that I am recovering from an injury that I don't even know what started it! I learned this lesson the hard way, as I failed to listen to my body, which resulted in me tweaking something that causes a ton of pain in my left side of my body. While it might seem like a lot of time-consuming work to do EVERY session in the gym, doing these can prevent you from getting injured that might keep you out of the gym for months at a time.
First thing is warming up properly. An inadequate or non-existent warm up is one of the primary factors leading to injuries in the gym.The goal of warming up is to get your muscles, joints and connective tissue ready for some serious action. More specifically, you want to stimulate joint lubrication, increase core temperature and blood flow to local tissue, and activate neuromuscular coordination and stabilization. Depending on your training program and the muscle groups you're going to be training that day, you'll want to customize your warm up to focus more on those muscle groups and their corresponding joints.
Be very attentive of your form. Focus on learning the movement with proper form using just your body weight first, and only once you have it down, add an external load like a barbell. I always teach my clients that form is number one and the weight comes second. I should be able to ask you which muscle you are working and you should be able to tell me that without much hesitation. Perfect practice makes perfect. When you're learning a new movement, make sure to execute every single rep as perfectly as you can. You do not want to learn a new movement incorrectly, as that can not only lead to injury, but it is also very hard to unlearn bad habits once they are formed.
Your day off of the gym is not to just lay around. That dedicated day off is for you to do mobility and foam rolling. If a muscle is tight and stiff, it and the surrounding joints and tissues are vulnerable to injury. That's why having proper mobility is imperative for staying out of trouble in the gym. Address any trigger points you might have in order to prevent myofascial pain. Foam rolling and massages using a lacrosse ball are great tools for that.
Last but the MOST important is recovery. This is nutrition, sleep, rest days and proper hydration. Give your body what it needs to handle the work you’re asking of it. Make sure to eat a healthy, balanced diet and cut out the junk food. Far too many people train hard, and then completely disregard their recovery. They don't have the habit of drinking enough water, don't get enough sleep, and overdo it on the weekends. Then go into Monday training and hurt themselves because they did nothing to prep / repair their body for the workload needed.
Let me restate this: injuries suck. They hurt, they're inconvenient, and they decrease your quality of life. Make sure to follow the advice above, and live to lift another day. All the effort is definitely worth it, in the long run.