At novice level :
Use instance variables when : Every variable has a different value for different object. E.g. name of student, roll number etc..
use static variables when : The value of the variable is independent of the objects (not unique for each object). E.g. number of students.