A static variable is shared by all instances of the class, while an instance variable is unique to each instance of the class.
A static variable's memory is allocated at compile time, they are loaded at load time and initialized at class initialization time. In the case of an instance variable all of the above is done at run time.
Here's a helpful example:
An instance variable is one per object: every object has its own copy of its instance variable.
public class Test{
int x = 5;
}
Test t1 = new Test();
Test t2 = new Test();
Both t1 and t2 will have their own copy of x.
A static variable is one per class: every object of that class shares the same static variable.
public class Test{
public static int x = 5;
}
Test t1 = new Test();
Test t2 = new Test();
Both t1 and t2 will share the same x.