What exactly is the meaning of length contraction? Let's say a train of length $L$ (wrt ground) is standing on rails which have markings for every femtometre (or even smaller units). Now if someone takes a photograph and measures the distance between the two tips of the train with the help of the markings on the rail, he will measure it as $L$. say the train acquires a constant speed and continues travelling in the same direction. Now if someone takes a photograph of the train and measures the said distance in the said way, will the result be different from $L$? 
 A: First, important semantics:
By "take a photograph of", you probably really mean
"someone-at-rest-with-respect-to-the-track simultaneously [in his frame] measures" 
the ends of the L-separated-markings on the track
and the front and back ends of the train. (... Just to avoid issues with "optical effects" in relativity, which are interesting but make the more important kinematic effects harder to tease out).
Short answer:
When an observer measures "the [apparent] length of a train",
she measures "the distance between the train-worldlines in her frame"
that is, "the distance between the intersection of the train worldlines with her x-axis at a given instant at time t [in her frame]".


*

*If the train is at rest in her frame, 
she measures a length equal to "the proper length of the train" (call it OL).

*If the train is in motion in her frame,
she measures a length shorter than OL.
This is Length Contraction.

Longer answer follows, in two parts:

Part 1: An analogy in the Euclidean plane. 
Consider two parallel lines---one through point O and the other 5 units away, when oriented vertically. These are the $\rm\bf\color{red}{red\ lines}$.


*

*Note that $\vec{OL}$ is perpendicular to the red lines... 
and the important reason it is perpendicular is that
 $\vec{OL}$ is the radius of a circle and the distant parallel line is the tangent to the circle at $L$.



Now, let's rotate about point O and "tilt" the parallel lines to the $\rm\bf\color{green}{green\ lines}$.
To construct the distant parallel line to be 5 units away, we draw a circle centered at point O that goes through L
and find the point (call it P) on the circle
whose tangent is parallel to the tilted line through O. 
Note that $\vec{OP}$ is perpendicular to the green lines,
and it is the analogue of the "proper length".
Observe that "$\rm\bf\color{red}{Red}$" measures the "distance between the green lines" to be longer than $\vec{OL}$.
Observe that "$\rm\bf\color{green}{Green}$" measures the "distance between the red lines" to be longer than $\vec{OP}$.

Part 2: Now, we'll do the Special Relativity case.
I've drawn a spacetime diagram on rotated graph paper so we can more easily count the ticks along various segments and so that we can more easily see Minkowski-perpendicularity of the train's x-axis with its worldline.
In the special relativity, the Minkowski spacetime diagram (position-vs-time graph) uses the
hyperbola as the analogue of a circle.
(It's not an arbitrary choice...it follows from Einstein's postulates and it's what is consistent with experimental measurements not significantly involving gravity.)

The $\rm\bf\color{blue}{blue\ lines}$ have the same slope as the green lines from before.

By counting, the grey-diamonds correspond to 3 units of space according to $\rm\bf\color{red}{Red}$. So, the slope (velocity) of 
$\rm\bf\color{blue}{Blue}$'s worldline is (3/5)c, according to $\rm\bf\color{red}{Red}$.
(In length contraction formulas,
the gamma-factor appears... it is $\displaystyle\gamma=\frac{1}{\sqrt{1-(v/c)^2}}=5/4$ for $v=(3/5)c$.)
Following the same procedure as before,
To construct the distant parallel line to be 5 units away, we draw a Minkowski-circle (the hyperbola) centered at point O that goes through L
and find the point (call it M) on the Minkowski-circle
whose tangent is parallel to the tilted line through O. 
Note that $\vec{OM}$ is Minkowski-perpendicular to the blue lines,
and it IS THE "proper length" between the blue lines.
Observe that "$\rm\bf\color{red}{Red}$" measures the "distance between the blue lines" to be shorter than $\vec{OL}$.
Observe that "$\rm\bf\color{blue}{Blue}$" measures the "distance between the red lines" to be shorter than $\vec{OM}$.
This is Length Contraction.
How short is it? $$\frac{5}{\gamma}=\frac{5}{\frac{5}{4}}=4$$
A: There are two possible ways to take photographic picture of the train:
1) An observer who is at rest in the frame of the rail places many infinitesimal cameras along the embankment in the immediate vicinity to the passing train. These cameras make click simultaneously in the embankment's frame. Then this observer glue all "small" pictures into single "long" picture. The train will appear Lorentz - contracted on the film.
2) An observer takes picture from some distance from the train. In this case spatial position of the camera wrt the train plays important role and picture depends on it and this observer must take into account light propagation time, or so called light - time correction.
If this observer will take picture exactly at that moment when the center of the train IS just opposite of the aperture of his camera (light received at points of closest approach), the train will appear $\gamma$ times stretched. The observer may give double explanation to this picture:
2.1) The train is moving and I am at rest. The rays that simultaneously go through the aperture of my camera have been emitted at different moments, so I see the train "in the past" when the ends of the train were at different distances from the aperture and were emitted at different moments, that's why the train appears stretched, even though it is actually contracted. 
2.2) Relativity allows to consider  this "vice versa setup" - the train is "at rest" and the camera (and the observer) is moving at the moment when it takes the picture. Sure the picture is still the same or $\gamma$ times stretched, but now we think in the terms of train's rest frame. The rays of light that had been simultaneously emitted from the ends in the trains frame will simultaneously pass through the aperture and simultaneously hit the film, since rays of light from the ends of the train to aperture and from aperture to the film form similar triangles. The observer may explain "stretched" picture as due to Lorentz - contraction of the film in the camera.
There is one more possible setup - the camera takes picture of the light that was emitted at points of closest approach. In this case the train will appear $\gamma$ times contracted.
There is quite simple article with some diagrams
