The classical electromagnetic waves may have many forms. The simplest examples are "monochromatic" waves with a well-defined frequency $f$ – the number of periods per second. The wavelength – the distance between two maxima of the wave – is $\lambda=c/f$.
When you change something about the electromagnetic field at one point, i.e. when you try to modify an electromagnetic wave, you can't instantly modify anything at a distant place. The information and influence can never propagate faster than $c$, the speed of light in the vacuum. This is a completely general fact about Nature that follows from the special theory of relativity and it applies to quantum theory, too. If you start with a wave of a huge wavelength $L$ and modify quickly something about the wave in a small region and in a timescale much shorter than the period of the electromagnetic wave, in a hope that this allows you to "instantly" affect distant points of space, you will fail. Instead of making a long electromagnetic wave collaborate on your project, you will create some electromagnetic waves of a much higher frequency and shorter wavelength. Too long electromagnetic waves just don't allow you to make things "really quickly" – in times shorter than $T$, their period – and too locally – in regions much shorter than the wavelength. Whenever the resolution of time or space is much better, it just proves that some electromagnetic waves of much higher frequency and shorter wavelength are present.
To describe the waves in the microwave oven, it is enough to consider classical physics i.e. avoid the notion of photons. The microwaves – electromagnetic waves whose wavelength is just a little bit shorter than the size of the oven – have a negligible chance to get through the holes because these holes are much smaller than the wavelength. The mechanism is sometimes called electromagnetic shielding. How does it work?
Well, if you want to discuss waves of wavelength $\lambda$ only, their dependence on space must always have the form $A\cdot \cos(2\pi x / \lambda)$: waves with the right distance between the minima. However, the metallic cage surrounding the interior of the oven imposes the potential $\phi=0$ at a very dense network of points. When you try to write down the potential as $A\cdot \cos(2\pi x / \lambda)$, while making sure that it's zero at all points where there is a conductor, you will find out that there is no solution except for $A=0$. The wave of the given wavelength just can't get through at all. Alternatively, you could calculate the reflection from the metallic points of the mesh (not counting the holes). They would interfere with each other and guarantee that the probability of reflection is nearly 100 percent.
In other words, the microwave-frequency photon is "really large", at least as large as the wavelength, and it just "doesn't fit in". It could fit in if it "pretended" it was a shorter-wavelength photon but that would be a different one. The microwave oven prescribes a frequency $f$ and the corresponding wavelength is always $c/f$ and cannot change. You may also look at the situation with a "poor resolution" so that you "neglect" distances shorter than the wavelength. From this viewpoint, the metallic caging of the oven looks solid despite the small holes. That's ultimately why it looks solid to the electromagnetic waves.
All these things may also be phrased in terms of photons – which is needed in quantum theory – even though, as I said, it is not necessary for microwaves because they contain a huge number of coherent photons so that this large group of photons behaves classically.
Individual photons are described by wave functions that mathematically look like an electromagnetic wave. It may be monochromatic but it may be a mixture of different frequencies, too. Individual photons' wave functions propagate through the oven or anything else pretty much just like the classical electromagnetic waves. That's why photons of microwave frequencies can't escape from the microwave, either. But the interpretation is different: the wave function isn't directly measurable like the electric fields. Instead, it encodes (after squaring) the probability density that the photon is here or there.
If you try to catch a photon whose wave function is spread over a large region, you have a certain calculable chance that you will catch it "somewhere here", in a particular nearby region $V$. But when you do so, the probability is zero that the photon is simultaneously at some other, distance place $P$. So whatever you do to the photon here – if you are lucky at all and the photon "shows up" here – will not affect what is happening very far from you. Effectively, if you see the photon here, the "wave function collapses" and you're sure that the photon isn't "over there" so it can't do anything there. The photon was never over there; it only had a chance to be there but your measurement showed that the chance didn't materialize. These points are often misunderstood because people are trying to imagine that the wave function of the photon is a real wave that must leave some traces even if the photon is ultimately seen elsewhere. But it can't and it doesn't leave any traces whatsoever: the nonzero wave function only quantified a "potential" that something may be seen somewhere. When it's seen elsewhere, it's a proof that the potential was never "real".
At any rate, you will see that photons can't be used to send superluminal signals, either.
Since electromagnetic energy is carried by photons and moves in forms of waves, does it mean that a single photon when propagating through space doesn't follow the straight path but instead always moves up and down, up and down like a wave.
The term photon belongs to the realm of quantum mechanics. The photon is a fundamental elementary particle in the standard model of particle physics. Electromagnetic energy is defined well in classical electrodynamics and it does move this energy as a wave in time and space.
A single elementary particle propagating through space is mathematically modeled by a wavefunction which is a solution of a quantum mechanical equation. This is a complex number function, it has a sinusoidal form but the only physically measurable effect is the probability of getting a "photon" signal at a specific (x,y,z,t). It is the probability that has a sinusoidal dependence in space time, not the photon, as can be seen in the answer here. The energy of the photon is h*nu, where nu is the frequency of the classical wave which will emerge from a large number of such energy photons.
So it is not possible to talk of a trajectory of a single photon at the microscopic quantum level. It is only macroscopically, when the atomic source is known, and the interaction footprint of the photon is detected on a screen or a camera that a straight line can be drawn which in effect is the optical ray of the classical em wave.
If so another question arises the speed of propagation of light in vacuum is fixed meaning that it will always take the same amount of time for it to travel from point A to point B, but if a photon always moves up and down it will also mean that it travels longer distance than the distance between A and B and so it ill travel faster than light propagates, is it even possible,
No, it is not possible in vacuum. The photon does not propagate as you imagine, and can only be described by its energy=h*nu and its spin direction. It always travels at c.
In the complicated quantized environment of a medium with an index of refraction the way the photon wavefunctions are related to the emergent classical wave, shows that the individual photon paths, which at the microscopic level are always in vacuum and travel with velocity c, can not be an optical ray. An individual photon impinging on a transparent medium will interact by elastic scatterings with the atoms of the lattice and certainly its path cannot be one straight line. In coherence with the zillions of photons in a classical em wave it is better to discuss the classical paths and let quantum mechanics take care of the individual interactions. A true analysis quantum mechanically needs quantum field theory and is unnecessarily complicated.
Best Answer
As knzhou says in a comment:
Some sources, such as lasers, emit photons with very long coherence lengths. For instance, the laser in your CD player probably emits wavetrains with lengths of ~10 cm.
Other sources emit photons with much shorter wavetrains. For example, if you look at thin film interference patterns made by light from a sodium discharge tube, the patterns never have more than ~100 fringes, which is because the sodium atoms emit wavetrains with lengths of ~100 wavelengths. This is determined by the properties of the atom. For example, if the half-life of the transition is ~100 periods of the light wave, then the wavetrain will have a length of $\lesssim100$ wavelengths.