Vocademy 
Einstein imagined a long and straight railway track or railway embankment. He added a very long train traveling along the rails with a constant velocity. Observers traveling in this train will naturally use the train as a rigid reference body to anchor their frame of reference (coordinate system). With the train on the track, every event that takes place along the track also occurs at a particular point on the train, with the definition of simultaneity being the same for both.

Let's say lightning strikes both ends of the train just as the midpoint of the train, M', coincides with M, which is fixed to the embankment. The light emitted from both strikes, traveling the same distance, will arrive at M simultaneously. An observer at M will rightly conclude that the lightning struck the ends of the train simultaneously. However, an observer at M' will see the lightning strike the front of the train sometime before he sees it strike the rear.
According to the explanation in the English translation of Einstein's book, the observer at M' will see the lightning strike the front of the train before he sees it strike the rear of the train because, in reference to the embankment, he is hastening toward the light coming from the front strike while riding ahead of the light coming from the rear. Therefore, the observer at M' will intercept the light from the front strike before it reaches M, thus seeing it early while the light from the train has to catch up, causing it to appear late. Hence, the observer at M' will see the light emitted from the front strike earlier than the rear strike. The observer at M' must, therefore, conclude that the lightning strike at the front of the train took place earlier than the strike at the rear of the train.
According to special relativity, it is correct that the observer at M' will see lightning strike the front of the train before he sees it strike the rear. However, the above explanation violates the tenets of special relativity.
Let's say that the observers at M and M' decide to conduct an experiment to discover the cause of the discrepancy. Let's assume they make an apparatus to cause lightning to strike the ends of the train simultaneously, as seen by the observer at M. The points in space where the lightning strikes are arranged to be equidistant from M. The timing is adjusted so that the observer at M sees the lightning strike the ends of the train. Therefore, the ends of the train must be equidistant from M at the time the lightning strikes regardless of where they are when the light emitted from the strikes arrives at M. This establishes that the lightning strikes just as the midpoint of the train, M', coincides with M on the bank as that is when the ends of the train are equidistant from M. Therefore, from the frame of reference of the observer at M, lightning strikes both ends of the train simultaneously just an M' coincides with M.
The observer on the train at point M', the center of the train, sees the lightning strike the front of the train before he sees it strike the rear. He knows that in either case, the light traveled the same distance from either end to the center of the train. He also knows that the lighting struck both ends simultaneously, as proven by the previous adjustments to the system while observing at M with the light from both strikes seen simultaneously. Therefore, he is forced to choose between two conclusions.
The first possible conclusion, as Einstein explains in Chapter IX of Relativity, is that the observer at M' hastened toward the light emitted from the strike at the front of the train, thus intercepting it before it reached the observer at M on the railway bank. This can be quantified in two ways. First, the observer's velocity combined with the velocity of the light coming from the front of the train giving a closing speed of c + v. Likewise, riding ahead of the light emitted from the rear of the train, the closing speed would be c  v. This tends to explain why the observer at M' sees the lightning strikes at different times but results in velocities of light that are something other than c.
Alternatively, the observer at M' sees the lightning strike at both ends of the train, which are equidistant from M.' However, he sees the strike at the front of the train before he sees the strike at the rear of the train. Knowing from previously calibrating the system that the lightning strikes both ends of the train simultaneously and that he is equidistant from both ends of the train, he must conclude that the light from the front of the train traveled at a velocity greater than c and that the light from the rear of the train traveled at a velocity less than c.
Einstein had already established that measuring a velocity of light other than c is incompatible with the principle that light travels at a c velocity for all observers. Assuming it is true that light travels at a velocity of c for all observers, we are left with only one other possible conclusion, which is, from the frame of reference of the observer at M', lightning actually strikes the front of the train before it strikes the rear of the train.
Vocademy 