Would a force of friction exist in this situation? I have studied that friction is due to breaking of molecular bonds between surfaces while they are in motion. In the case below, I feel that since there isn't any motion, there will be no frictional force. But when I asked my physics teacher he said that there would be a frictional force, but I don't see why.

The yellow lines represent fixed walls, and u is the coefficient of friction. The block is being pushed against the fixed wall with a force F.
 A: We know from experiment that friction occurs even when there is no relative motion between surfaces - this is called "static friction". So logically friction cannot be due solely to the breaking of molecular bonds between surfaces that are in motion relative to one another, because if it were then there would be no static friction. Also, if the molecular bonds between surfaces in contact were the sole cause of friction then we would see a measurable resistance when we lift one object off another one - and we do not observe that.
Static friction is due to microscopic roughness or asperity of surfaces - even surfaces that are polished to a mirror finish are not truly smooth at microscopic scales. However, this is an aspect of materials science that is not totally clear - Wikipedia says

The relationship between frictional interactions and asperity geometry is complex and poorly understood.

A: It's possible there is a frictional force, but it is not required. Imagine a block on an inclined plane, held in place solely by static friction. One could hold another block on the incline and slide it up toward the first block, taking more of the weight of the stationary block as it presses up against it. At some point, the entire weight of the block will be supported from below, and there will be no frictional force holding it in place.
This situation is identical. Without knowing the exact specifics of how the block and wall are in contact, it could be the case that the wall is the only thing resisting the block, in which case there is no frictional force. Or, it could be the case that friction is the only thing resisting the block, in which case the wall provides no normal force. Or, it could be anywhere in between these two extremes.
A common interpretation of this scenario would be that the wall provides the entire normal force and that friction does nothing - this would perhaps be the most logical interpretation. The opposite interpretation, where the wall provides no force at all, would be a bit unusual, since there would be no reason to include the wall in the diagram in the first place. The intermediate interpretation where the wall provides some force and friction provides some force is also a bit unusual, since there is no information given to calculate the balance between them.
TL; DR: The frictional force may exist in this scenario, but it's impossible to say whether it's equal and opposite to F, zero, or anywhere in between from the information given.
A: Think about it this way. If the horizontal surface was frictionless (i.e., $μ=0$), would the object move? No, because the wall would exert a force on the object equal and opposite to the applied force $F$ for a net force of zero. Therefore there is no need for a static friction force on the horizontal surface to prevent motion of the object.
However, a good "test" to determine whether or not static friction is actually relied upon in the situation depicted, is to remove the wall and see if the object moves.
Hope this help.
A: If this is a 'problem' based purely on newtonian mechanics, then NO, no frictional forces will act as there is no tendency, or even a possibility of the block to move relative to the surface, and that is exactly what is required for static friction.
What some others have mentioned, like @Manu , is that the little ridges in the surfaces will contribute to providing a contact force whose component parallel to surfaces will oppose the motion, hence, static friction. But this definition of friction is just not what is conventional when we define  friction as $$F=\mu.N$$
In this definition, friction is a uniform, combined property of the two surfaces. We don't even go into the dynamics of the ridges on the microscopic scale, which is quite complex.
Therefore, if you really want to measure the frictional force in a real scenario, I would suggest placing a weighing machine(or some other normal force measuring device) between the block and the wall. This is because in the real scenario, a fraction of the force should be compensated by the ridges in the floor surface(as the little ridges act like individual systems, like individual walls), and the rest will be returned by the normal force from the rigid wall; thus equilibrium is still maintained.The only scenario that seems impossible to exist is the one where none of the applied force reaches the wall.
