Let $X$ be a $K3$ surface and consider on $X$ a line bundle $\mathscr L \neq \mathscr O_X$ with self-intersection $(\mathscr L, \mathscr L) = 0$ . Because $\mathscr L \neq \mathscr O_X$, not both $\mathscr L$ and $\mathscr L^{-1}$ have a non-zero section. Assume $h^0(X, \mathscr L^{-1}) = 0$.
First, the Riemann-Roch theorem and Serre duality on $X$ imply $h^0(X, \mathscr L) + h^0(X,\mathscr L^{-1}) \geq \chi(\mathscr L)= 2 + (\mathscr L, \mathscr L)/2 = 2.$
Hence $h^0(X, \mathscr L) \geq 2$ and $| \mathscr L|$ contains an effective divisor. Any effective divisor $C \in| \mathscr L |$ is defined by an exact sequence
$0 \longrightarrow \mathscr L^{-1} \stackrel {s} \longrightarrow \mathscr O_X \longrightarrow \mathscr O_C \longrightarrow 0.$
with a non-zero section $s \in H^0(X, \mathscr L)$. Tensoring with $\mathscr L$ gives
$0 \longrightarrow \mathscr O_X \longrightarrow \mathscr L \longrightarrow \mathscr L_C \longrightarrow 0.$
We get the exact sequence
$0 \longrightarrow \mathbb C = H^0(X, \mathscr O_X) \longrightarrow H^0(X, \mathscr L) \longrightarrow H^0(C, \mathscr L_C) \longrightarrow H^1(X, \mathscr O_X) = 0.$
We have $h^0(C, \mathscr L_C)\leq 1$: Otherwise $h^0(C,\mathscr L_C) \geq 2$ and $\mathscr L_C$ would have a non-zero section with at least one zero, which contradicts deg $\mathscr L_C = (\mathscr L, \mathscr L) = 0$. Hence $h^0(X, \mathscr L) \leq 2$. Summing up: $h^0(X, \mathscr L) = 2$.
Secondly, we have to show that the map $\Phi_{\mathscr L}$ is well-defined: Take two linearly independent sections $s_0, s_1 \in H^0(X, \mathscr L)$. Then $\Phi_{\mathscr L}$ is well-defined iff $\mathscr L$ is globally generated. Consider the two effective divisors $C_i := Var(s_i), i= 0,1$. We have $C_0 \neq C_1$, because $s_0$ and $s_1$ are linearly independent. Their intersection number is $(C_0, C_1) = (\mathscr L,\mathscr L) = 0$; hence $C_0 \cap C_1 = \varnothing$. As a consequence, both sections have no common zero and generate $\mathscr L$.
Thirdly, the map
$\Phi_\mathscr L =(s_0:s_1): X \longrightarrow \mathbb {P}(H^0(X, \mathscr L)) \cong \mathbb P^1$
is a fibration iff it is not constant. But the meromorphic function $s_0/s_1$ on X is not constant because the two sections are linearly independent. As a consequence $\Phi _\mathscr L(X)= \mathbb P^1$.
Concerning generalization: Only the first part uses specific properties of a $K3$ surface, namely $\kappa_X \cong \mathscr O_X$ as well as $H^1(X, \mathscr O_X)=0$. More general are Enriques surfaces $X$ with $\kappa_X \neq \mathscr O_X$ but $\kappa_X^{2} \cong \mathscr O_X$ and $H^1(X, \mathscr O_X)=0$. They too have elliptic fibrations over $\mathbb P^1$. Questions like these subsume under the header elliptic fibrations of surfaces which have been explored by Kodaira. The standard reference is the book "Barth, W.; Hulek, K.; Peters, Ch., van de Ven, A.: Compact complex surfaces".