using namespace std;
cout<<"base fun called\n";
static First x; //Line 1
static First *y; //Line 2
First Second::x; //Line 3
First* Second::y; //Line 4
y is a pointer (not an object). Since it is
static, it gets initialized with
nullptr, unless you explicitly define it initialized to something else (e.g. have some
First z; object and define
First* Second::y= &z;).
Second::y->fun(); is dereferencing a null pointer, and that is undefined behavior. You really should be very scared.
We cannot answer all your questions here (an entire book would be needed, and the notion of pointer and its semantics is difficult to explain, and related to pointer aliasing; read also about virtual address space). So take a few weeks to read some good book like Programming - Principles and Practice Using C++; you probably will benefit by also reading SICP & Introduction to Algorithms (even if neither is about C++; however both are related to programming, which is difficult to learn).
Notice that using raw pointers is often (but not always) a bad smell in genuine C++11. You probably should consider having smart pointers, but YMMV.