A static variable is a variable that retains its value across function calls and is shared across all instances of a class in object-oriented programming. It is initialized only once and can be accessed without creating an instance of the class, making it useful for maintaining state or shared data.