This is one of the most fundamental questions possible. Hence although it is old and well answered, I venture to add something, hoping to make it seem as transparent as possible.
I would suggest the way to understand this construction is to look at it backwards. I.e. by its very definition, projective space carries a tautological line bundle, whose dual bundle has as sections the linear coordinates. These sections have no common zeroes because the hyperplanes have no common points. Hence any subvariety of projective space also has by restriction a line bundle whose sections have no common zeroes.
Moreover a point of projective space is determined by the set of hyperplanes through it, so any subvariety is determined by the restricted line bundle, since each point is recovered from the set of sections vanishing on it. Moreover the projective space it self is dual to the space of hyperplanes, hence to the space of global sections of the bundle. Hence the bundle on the subvariety determines both the ambient projective space and the embedding.
Now one sees immediately that one can imitate this to give a map, not necessarily an embedding, from any variety with a line bundle whose sections have no common zeroes, to the dual projective space of its space of sections, by sending each point to the subset of its sections vanishing at that point, as Anton said.
In a nutshell, since projective space has a line bundle whose sections have no common zeroes, and line bundles and sections pull back under maps, having such a line bundle is a necessary condition for a map to projective space. Then one asks whether it is also sufficient, and it is, as above.
It is easy also to recover the properties that determine whether the map is an embedding.
Looked at this way, there is nothing mysterious about this construction - it is in fact the defining property of projective space.
1. Are there simple examples (say on a curve or surface) of line bundles that are globally generated but not ample, of ample line bundles with no sections, of ample line bundles that are globally generated but not very ample, and of very ample line bundles with higher cohomology?
On a curve of genus $g$, a general divisor of degree $d \le g-1$ has no sections. Of course, if $d>0$ then it is ample.
$K_X$ on a hyperelliptic curve is globally generated but not very ample.
Look at $L=\mathcal O(1)$ on a plane curve of genus $d$. Then from
$$ 0\to \mathcal O_{\mathbb P^2}(1-d) \to \mathcal O_{\mathbb P^2}(1) \to \mathcal O_C(1)\to 0$$
you see that $H^1(\mathcal O_C(1))=H^2(\mathcal O_{\mathbb P^2}(1-d))$ which is dual to $H^0(\mathcal O_{\mathbb P^2}(d-4))$. So that's nonzero for $\ge4$.
2. Given an ample line bundle $L$, what is the minimal number $k$ so that I can be sure $L^k$ has sections, is globally generated, is very ample? Is $k$ related to the dimension of $X$?
Again, just look at the divisor of a degree 1 on a curve of genus $g$. You need $k\ge g$, so you see that there is no bound in terms of the dimension.
It turns out that a better right question to ask is about the adjoint line bundles $\omega_X\otimes L^k$ ($K_X+kL$ written additively). Then the basic guiding conjecture is by Fujita, and which says that for $k\ge \dim X+1$ the sheaf is globally generated, and for $k\ge \dim X+2$ it is very ample. This is proved for $\dim X=2$, proved with slightly worse bounds for $\dim X=3$. For higher dimensions the best result is due to Angehrn-Siu who gave a quadratic bound on $k$ instead of linear. There are some small improvements for some special cases.
3. If $L$ is very ample, I can use it to embed $X$ into some projective space. Then by projecting from points off of $X\subset \mathbb P^N$, I can eventually get a finite morphism $X\to \mathbb{P}^d$, where $d$ is the dimension of $X$. But what if I just know that $L$ is ample and globally generated? Can I also use it to get such a finite morphism to $\mathbb P^d$?
But of course $L$ gives a morphism $f$, and it follows that $f$ is finite: $f$ contacts no curve so $f$ is quasifinite, and $f$ is projective (since $X$ was assumed to be projective). And quasifinite + proper = finite.
Best Answer
1) The vector bundle $E=\mathcal O(1) \oplus \mathcal O(-1)$ over $\mathbb P^1$ has non trivial sections and so has its dual (which happens to be the same bundle $E$ ).
However $E$ is non trivial because each of its global sections has a zero.
2) Yes, a direct summand of a direct sum of line bundles on a complete variety is also a direct sum of line bundles.
This follows from Atiyah's general version of the Krull-Schmidt theorem .
Edit
Since Fei asks, let me remark that the trick in 1) works also for bundles which are not direct sums of line bundles:
If $T$ is the tangent bundle to $\mathbb P^2$, then $E=T \oplus T^* $ has non-trivial global sections , and so has $E^*=E$
However, since $T$ is indecomposable $E$ is not a sum of line bundles by Atiyah's result and is thus a fortiori not trivial.