Java – difference in instance variables and local variables? [duplicate]

Please refer to the following code fragment:

class One {
  static int n;
  int fun(int p) {
    int m;
    int q = p + 1;
    return q;

Why is static int n; not an instance variable? What is the main difference in instance and local variables? Java newbie here so any advice would be helpful.