Just don't start writing equations without a complete Free-Body-Diagram(may be rough diagram) according to the frame of reference..
1)Ground Frame
Now . Newtons law. $$\sum \vec{F_{ext}}=\frac{dp}{dt}=ma(for\ constant \ mass)$$
So, $$N-mg=\sum \vec{F_{ext}}=ma$$ Where system is boy in ground's frame.
Here we equate the net external force to the acceleration of body . $ma$ is not a force it is the measure of net force which causes body to accelerate.
2)In a accelerating frame(non-inertial)
here we have to add a fictious force $-m\vec{a}$ where $\vec a$ is the acceleration of frame .
Here too $$N-mg-ma=\sum \vec{F_{ext}}=0(as \ in \ frame \ of \ elevator \ boy \ is \ at \ rest)$$
Again you get $$N-mg=ma$$
If you put something on a table, it does exert a force on the table (and the table exerts a force back), but it might help to look at how a table exerts a force to push things away from itself, because this will also tell us which forces are in play and which come in pairs. And in general you are missing some forces in your analysis.
Let's start with the first example, there is a table (mass $m$) on the surface of the earth (mass $M$). The earth's gravity exerts a force of 10N pulling the table down, and the table's gravity pulls the earth up with a force of 10N. If the table wasn't on the surface that would be the end of it, the table would fall down at an acceleration of $1g$ and the earth would fall up at an acceleration of $1g m /M$, and the latter is tiny compare to $1g$ because $m/M$ is so small. However the table isn't moving so there must be other forces at play.
What's this other force. Try squeezing a table versus moving it, moving it is easy so the mass $m$ of the table isn't too much for you to exert appropriately big forces. So apparently the table has a capacity to resist being compressed. And it does, it's like it is made up of a bunch of springs and that's why it's own weight doesn't collapse itself in on itself. So if you try to compress it beyond it's original configuration it will push back, and it pushes back quite hard for even little amounts of compression, that's why it doesn't get much smaller when you push hard to squish it together. So stop squishing it and let's look back at the table on the ground. It would accelerate down but the earth's surface is in the way, so now downward motion would require moving the earth (which is massive) or compressing the earth, and the earth too can be compressed, though it is big so in practice it is hard to wrap your arms around both sides to squeeze it, but its made of things that we know can be squeezed, pick up some dirt make a dirt ball and squish it, so at least the dirt part near the surface is squishable, same with rocks (they definitely resist being squished), even water resists being squished. So the table gets squished so it can move down a bit (and the earth gets squished so it can move up a tiny bit) but when the earth gets squished it starts to push upwards because the dirt at the top of the surface when compressed exerts forces against everything around it, and the table does the same thing. Immediately when you table is placed on the surface it starts only being compressed a little bit, so the compression forces are small, but that means they aren't up to the 10N level get so the table and earth will continue to move towards each other. So they keep moving towards each other and keep getting more and more compressed until eventually they are so compressed that the forces from the compression can balance out the gravitational force.
At this point the table now feels a force of gravity downwards of 10N and a contact force (from the compression of the earth) upwards of 10N so it doesn't move, and the earth similarly feels an upwards 10N force of gravity upwards and the earth also feels a downwards force (from the compression of the table) of 10N. At that amount of compression, the table and earth stop being accelerated towards each other. The table and the earth can compress different amounts based on how squishy they are, but the forces of the compression are equal and opposite.
In summary, the compression forces are 10N and equal and opposite, the gravitational forces are 10N and equal and opposite. Nothing moves because the table feels gravity from the earth downwards and the force caused by the earth being compressed is directed upwards. Those two forces acting on the table are equal and opposite because it kept compressing the earth because the earth was in the way and it kept doing that until the compression was enough to balance the gravity because only then would it stop compressing. So that balance took time and didn't happen right instantly. the fact that the 10N of gravity up on the earth and the 10N down on the table are equal and opposite happened right away and because of Newton's third law (or conservation of momentum).
So we have all the forces, the action reaction pairs that have to balance (like gravitational forces the two bodies exert on each other), and those compression forces that balance each other but don't necessarily balance gravity unless they can get strong enough (by being compressed enough) over time.
Now let's put something light on the table, we can stack a table on a table. The tables now compress each other and when they are compressed enough the bottom table will trough contact compression caused forces be pushing the top table up by 10N to balance the 10N the earth exerts pulling the top table down. But if the bottom table is pushing the top table up 10N, then the top table is pushing the bottom table down 10N by it's own compression induced forces. So now the bottom table has 20N of force downwards (10N of the earth pulling and 10N of the top table pushing it). So it needs to compress the earth enough to get 20N upwards compression induced force from the earth. Which means it itself gets compressed and compressed enough that it exerts 20N of downwards force on the earth. That's super, since the earth is getting pulled up 20N by the gravity of the two tables, so this 20N downwards force caused by the compression of the table can balance that.
So we understand how things can be placed on tables. But no collapse. So what's that all about? Remember how the table started out not compressed at all, then got compressed more and more as it got smaller and moved a bit towards the earth? It kept compressing more, thus being small thus being able to move a bit closer to the earth until that compression induced force got large enough to balance gravity. But those compression induced forces can't get arbitrarily big. have you ever frozen something with liquid nitrogen and then dropped it and watched it shatter even though normally it doesn't shatter from a drop like that? Things like temperature can affect how things compress, and compression isn't the only option, shattering is another option. The breaking point of the table is when it starts to get compressed to much, and it could depend on the inner working of the table, such can be affected by temperature, the table has wood grains, so it might be able to handle compression in one direction better than in others, and in general the exact details of how and when it breaks are complicated. It's breaking because that is the alternative to producing greater compression forces. When the table just compressed, and when the compression didn't change the table's size much (i.e. it got the needed 10N with little change in volume and did so quickly) then it was easy to ignore how the table exerted these contact forces (we can just call them contact forces, note they are exactly large to avoid the objects passing through each other and move on). Many materials will start to deform noticeably before they break, so if you notice that you can see the table change its shape (you can see the compression) then it will break if you keep putting more and more things on it).
During that whole process of compression (from no compression to final compression) the table technically moved a little bit because the forces were imbalanced). But in the example where it breaks it never gets to a point where it stops moving.
Best Answer
You are basically correct. The apple and the earth exert equal but opposite forces on each other but, as they are in contact, neither of them can move. The forces are balanced by the internal pressure in the apple and in the floor.
Consider the case where the apple is not resting on the floor. In that case the apple will, of course, fall towards the earth. However, at the same time the earth falls upward towards the apple. As the earth has so much more mass than the apple, its acceleration is correspondingly smaller, due to $$a = f/m$$
Hence we never talk about the movement of the earth, but it is there. For the same reason, whenever a spacecraft uses a planet for a "slingshot" approach to increase its speed, the speed of the planet around the sun also changes, by a minute amount.
When the moon travels around the earth, what really happens is that both travel around their common centre of mass, which is still inside the earth, but not far from the surface.