The thing to do for weight lifting is do some light warm up cardio (5-10 minutes on your favorite hamster wheel variant - elliptical, treadmill, bike) to get your core temp up, then do a few warm up sets before big compound movements to improve blood flow to the target muscles and lubricate the joints.
Before doing your working sets on bench/squat/deadlift, do a few sets at a much lower weight. Like this:
Warm-up set 1: Start with the empty bar and warm up for a few reps there.
Warm-Up Set 2: 40-50% of your first set x 5 reps (if the empty bar falls into this percentage- skip this step).
Warm-Up Set 3: 60-65% of your first set x 3-5 reps
Warm-Up Set 4: 70-80% of your first set x 3 reps
Warm-up set 5: 85-90% of your first set x 1-3 reps
Warm-Up Set 6: 90-95% of your first set x 1-3 reps
Now do your working sets.
If you aren't lifting that much weight (bench press for example) you can skip a few of these and start at say 60-65% of your working weight.