Static variables in Java are variables that belong to the class itself, not to any individual object. When the class loads, the static variables are created once and shared by all objects. For example, in the code, the static variable 'count' starts at 0. Each time a new Counter object is created, the constructor increases 'count' by 1. This means all objects see the same 'count' value. After creating two objects, 'count' becomes 2. You can access static variables directly from the class without creating objects. This sharing behavior is useful for keeping track of data common to all instances, like counting how many objects have been made.