You can see my comment above which illustrates my confusion, but let me try to answer your question by carefully discussing what happens. (I have answered for an inertial frame of reference because in the noninertial case it depends which specific frame you pick, and I think a more universal answer will be more helpful)
First, the two blocks are at rest. The only forces acting on them are gravity and the contact force between them.
Then, I push on the bottom block. Assuming it slides, it begins to move to the right according to Newton's second law. Two possible things can happen to the top block:
- If the coefficient of static friction is large enough, the top block will be dragged along to the right by the force of friction from the bottom block.
- If the coefficient of static friction is not large enough, the top block will "slide off" the bottom block.
In the second case, kinetic friction would take over. The bottom block would move to the right, dragging the top block with it but since the force of kinetic friction is less than the maximum force of static friction, the force on it would be smaller, it's acceleration is less, and the top block would eventually fall off.
For your second question, let's assume the blocks reach a certain speed without the top block falling off, and then continue to move at a constant speed. Then, what is the acceleration of the bottom block? Zero, obviously. So, what is the acceleration of the top block? Also zero. Therefore there is not net force in the horizontal direction, and the force of static friction must be zero.
Remember to use Newton's second law "in both directions". The forces can tell you something about the motion of objects, but if you know the acceleration, you can often tell something about the forces on the objects as well.
EDIT: Two additional questions asked in the comments below:
1) In the second case, if the bottom block starts moving and the top block slides off means that from earth (inertial) the top block wont move and will stay where it was initially right?
That would happen if the static friction coefficient was small enough, and if you pulled hard enough (this would be the "pulling the tablecloth from under the china" trick). But the "realistic" answer is that you can't pull suddenly with enough force to avoid the frictional force all together. If you have pull 50 N to break static friction, you will likely have to "ramp up" from 0 N to 50 N, and sometime in that time period you will pass through engaging static friction and moving the top block.
2) If the two blocks are moving together and reach let's say 250 km/h, the top block won't never slide off right? it has nothing to do with velocity right? Then what will cause the top block to slide off?
This would depend on the force you applied. If you apply a very small force, you could eventually reach 250 km/h without the block falling. Once you hit that speed, if you stopped applying a force, the top block will never fall off. If you applied a force which was too large, you would quickly get to 250 km/h, but the top block would probably fall.
So "it has nothing to do with speed" is correct - it only has to do with the applied force. We should probably note that we are assuming air resistance is negligible, which is certainly not true at 250 km/h - the top block would essentially "blow off".