Is no work done when an object doesn't move, or does the work just cancel out? Let's say I push a block 5 meters with a force of 10 newtons. It can then be said that I did 50 joules of work on the block, since $$W = F*d = 10 * 5$$
However, when I push on the same block which is now up against a wall, the block does not move, and therefore, according to the equations, I do no work. However, I would like to ask if I truly do no work on the block, or if I actually do transfer 50 joules to the block, but the wall does work in the exact opposite direction, therefore we can either say that work on the block is (50 + -50) J or (0 + 0) J.
Which is technically correct?
 A: 
However, I would like to ask if I truly do no work on the block, or if I actually do transfer 50 joules to the block, but the wall does work in the exact opposite direction, therefore we can either say that work on the block is 50 + (-50), or 0 +0

$0 + 0$ correct as pointed out by other answers. However, I would like to add that the $ 50 + (-50) $ would have been the case when (suppose ) you push the block for $5 m$ with $10 N$ of force that moves the block  constant velocity and when friction is present. In this case the work done by you is equal and opposite to the work done by friction and there is no change in the object's kinetic energy.
A: You are doing exactly no work.
Think of a table. With its normal force it can hold up an apple forever. Does it constantly spend energy on doing that? No. Otherwise it would eventually "run out", which doesn't happen.
No energy is transferred between objects if no displacement or thermal interaction happens.
A: In your second example no work is done by you or the wall on the block because there is no displacement of the block. That is not to say you didn't expend any energy pushing on the wall. But the work you did is internal physiological work, and not physics work. Richard Feynman explained it this way in his physics lectures:
The fact that we have to generate effort to hold up a weight is simply due to to the design of striated muscle. What happens is when a nerve impulse reaches a muscle fiber, the fiber gives a little twitch and then relaxes, so that when we hold something up , enormous volleys of nerve impulses are coming in to the muscle, large numbers of twitches are maintaining the weight, while other fibers relax. When we hold a heavy weight we get tired, begin to shake, ...because the muscle is tired and not reacting fast enough.
That said, work can be positive or negative. Work is positive if the direction fo the force is the same as the direction of the displacement of the object. Positive work transfers energy to the object. In your first example you did positive work of 50 Joules on the block.
Negative work occurs if the direction of the force is opposite to the displacement of the object. Negative work takes energy away from the object. If in your first example you pushed the block on a floor with friction, the floor does negative friction work equal to the kinetic friction force times 10 meters. Friction work takes the energy from the motion of the block and dissipates it as heat.
If the block started at rest and ended at rest at 10 meters the negative friction work equals your positive work for a net work of zero. Per the work-energy theorem the net work done on an object equals its change in kinetic energy.
Hope this helps.
A: When you talk about the block being pushed against the wall at that moment only, there is already no displacement
present of the block if  ( which is 5m you have provided). This 5m is possible only when it moved before touching the block.Therefore ,W=0 for the block being pushed just near or touching the wall.
Even if let us say you had already pushed the block and after 5m , the wall stopped the block. Then , we calculate work done at the reference point. For example , after 5m before touching wall . W=50J but after touching the wall , W=0 , not (50J-50J) because at that reference , there is no displacement of the block.Remember, our system is block.
Points: In terms of work done to understand it more better.

*

*F = (m*a)

where mass of block is present but there is no acceleration of the block due to the wall pushing it back. Wall doesn’t let the block create acceleration for itself.


*Displacement

Since there is no displacement either of the block nor the wall. It doesn’t matter if wall displaces or not because our system is block. So , we must only consider whatever happens to the block. Therefore , displacement = 0 as well.
Hence , W = F(0) * S(0).
Do let me know if you have any difficulty.
A: Actually, for a real box, you will do some work when you compress the box. To hold it compressed you will have to contract your muscle cells continuously, to keep the force steady. They contract, expand, contract, expand, etc. Holding the box compressed (or just pushing on an incompressible box) is easier when you, say, place a strong ventilator in front of it. That way you don't get tired by the work done while continuously making your muscles contract.
In the same way, keeping a book on constant height requires a constant force. This can be given by a static table or by your stationary hand. Keeping your hand stationary does require work. Again you have to make a part of your muscles contract continuously. your hand is in a dynamic equilibrium instead of a static one like the table.
A: No. This isn't correct. The definition of work is a technical definition in physics. In physics, the work done is defined  as
$$W=\vec F \cdot \vec d$$
This definition is useful in applying the conservation of energy and work-energy theorem. When you push on the block up against the wall, you apply force to both the block and the wall but you do no work. Of course your body needs energy to supply the force.
Hope this helps!
A: All the above answers are referring to classical mechanics of work which is defined as $W=F*d$, i.e. as linear momentum in a closed system in units of poundes*inches, but since there is no motion work equals zero. By Newton's conservation laws energy is conserved.
If we look at system setup as an open system (Ludwig von Bertanlaffy's Open Systems Theory, the external energy (muscles, $E= F* dv/dt$ - as equivalent to Newton Law of Motion, $m*a = \mathrm{lb}*\mathrm{s}$, is pushing the (brick against the wall and we consume energy $E$. In open systems we have case of energy conversion by interaction between systems (external energy (muscles) , brick (mass $1$) and the wall (mass $2$)), as the energy is returned back to environment in a form of pressure potential energy, $F/ A$ ($\mathrm{lb}/\mathrm{in}^2$ of contact area). Here instead of converting energy to motion in form  of work ($W=F*d$, time independent), we convert external energy to work ($E= m * dv/dt$ time dependent (lb sec). In gravity environment, since brick and wall are rigid, based on Emmy Noether principle of Systems Symmetry, momentum is conserved, but energy is not conserved. If brick or wal wall were elastic or plastic, energy would be converted in brick or wall deformation relative to Newtonian global coordinates.In free space without any external constraints on systems, force from muscles would set brick and wall masses in linear motion relative to each other following Newton Law of motion.
