In your second snippet on line 4 and 5, you declare Enemy instances, which only have the data for an Enemy; this means they have no space to store anything additional that a Ninja or Monster has. Thus, that assignment is no good.
The first snippet works because when you declare a pointer, you say the pointer simply will refer to something of the Enemy type; i.e., something that can do everything that an Enemy can do. Since Ninja and Monster inherit from Enemy, they fulfill this requirement and the assignment is good.
Also, to see the polymorphism in action, use the enemy1/2 pointers on line 8 and 9 of your first snippet; notice that the Ninja/Monster versions of Attack() are called even though you are calling them via an Enemy pointer.
So are you saying any time i create an object, and set it equal to an object from another class, I have to pass a pointer by reference because without the pointer. The second object cant access the first object?