A practice swing is a swing that isn't meant to hit a ball, which you're allowed to make at any time during a round.

Practice strokes, actually hitting a ball, are another matter. During the play of a hole you can't hit practice shots, and doing so carries the general penalty. Between holes, you can usually practise putting or chipping on or near the green you've just finished.

In a bunker, your practice swing mustn't touch the sand.