To answer question 2 (with $X$ a scheme), just take for $S$ the affine line over a field $k$, for $X$ the usual ``$S$ with the origin doubled'' (two copies of $S$ glued along $S\smallsetminus\{0\}$) and for $f$ the obvious projection (which is the identity on each copy).

For question 1, the best example I know is a ``Galois twist'' of the above, where $f$ is still an isomorphism above $S\smallsetminus\{0\}$ but $f^{-1}(0)$ is the spectrum of a $\mathbb{Z}/2$-extension $k'$ of $k$, instead of two $k$-rational points.

To achieve this, start with the constant $S$-group scheme $G:=(\mathbb{Z}/2\mathbb{Z})_S$. Remove the nontrivial point of $G$ above $0\in S$: you get an open subgroup $H$ of $G$. Fixing a $\mathbb{Z}/2$-extension $k'$ of $k$, the $S$-scheme $S':=S\times_kk'$ has a natural action of $G$, induced by the Galois action on $k'$, and the quotient $S'/G$ is of course $S$.

Now the required example is $X:=S'/H$, with the natural projection on $S$. Clearly the $H$-action defines an étale equivalence relation, so $X$ is an algebraic space. Next, if you extend the scalars to $k'$, you get (the $k'$-version of) the preceding example. To see that $X$ is not a scheme, look at the only point $x$ of $X$ above $0$ (with residue field $k'$). If $U$ is any open subspace of $X$ containing $x$, then $U\times_kk'$ must contain both ``funny'' points of $X\times_kk'$, so $U$ cannot be affine (not even separated).

EDIT to answer Daniel's comments:

- Call $X_0$ the first example (standard affine line with double origin). Then the second example $X$ can actually be obtained as a Galois twist of $X_0$: the group $\Gamma:=\mathbb{Z}/2\mathbb{Z}\cong\mathrm{Gal}(k'/k)$ acts on $X_0$ by swapping the two copies of $S$, and then $X$ is just the corresponding Galois twist, i.e. the contracted product $X_0\times_k^\Gamma\mathrm{Spec}(k')$.
- Even a twist of a separated scheme need not be a scheme. Hironaka has constructed proper, non-projective $k$-varieties, and you can easily tune the construction to find such a variety $Z$ having an involution $\sigma$ such that there is an orbit $Y$ which is not contained in any affine open set. Then the twist $Z':=Z\times_k^\Gamma\mathrm{Spec}(k')$ is an algebraic space but not a scheme, since the twist of $Y$ is a point of $Z'$ which cannot have an affine neighbourhood. (By the same argument, the quotient $Z/<\sigma>$ is not a scheme, and neither is the symmetric square of $Z$ over $k$).