Used to caution someone they're close to crossing a line that could lead to trouble. By arguing with the boss, you're skating on thin ice.
Pro Tip 2/3
Consequence Implied
Implies potential negative consequences without specifying what they are. She's walking on thin ice with her constant tardiness.
Pro Tip 3/3
Metaphorical Use
No literal ice involved; purely metaphorical, meaning getting into an uncertain or dangerous position. This is the third warning; you're really skating on thin ice now.