If $f:\mathbb{A}^1\to \mathbb{A}^1$ is $x\mapsto x^n$, then $f_*\mathcal{O}_{\mathbb{A}^1}\cong\mathcal{O}_{\mathbb{A}^1}^{\oplus n}$? Let $f:\mathbb{A}^1\to \mathbb{A}^1$ be the map given by $f(x)=x^n$. (I'm giving this as a concrete example, but I also care about the global picture. I.e., what happens for more general finite maps.)
The standard semicontinuity theorems should imply that $f_*\mathcal{O}_{\mathbb{A}^1}$ is locally free, but I think that it's even globally free of rank $n$ (if $x$ is the coordinate on the domain, perhaps it even makes sense to say that $1,x,\dotsc,x^{n-1}$ is a basis). Is this true? If so, what happens for more general finite $f$?
 A: for simplicity all schemes are affine because what you are asking is generally a property for affine morphisms: if $$f: X \rightarrow Y$$ is a finite morphism, one might ask whether the push forward $f_*\mathcal{O}_X$ is locally free?
This is precisely the case for $f$ being finite flat, i.e. $f$ is finite and $\mathcal{O}_{X,x}$ is a flat $\mathcal{O}_{Y,f(x)}$ module.
In algebra terms: an $A$-module $M$ is finite locally free iff it is finitely presented and $A$-flat.
Note that if $f: X \hookrightarrow Y$ is the inclusion of a proper closed subscheme, then f is finite but not flat because $f_*\mathcal{O}_X$ is not free but has torsion.
In your specific case, the morphism is indeed flat! Note further that a fibre over a closed $k$-point $a\neq 0$ of your morphism $f: \mathbf{A}^1 \rightarrow \mathbf{A}^1$ (lets say over alg. closed $k$) looks like $Spec$ of $k[t]/(t^n-a)\cong \oplus_{i<n} k t ^{i}$ which is a finite number of points. This module is indeed generated by $1,t, \dots t^{n-1}$ as a $k$-vector space. All fibres look like this except at $0$ where $f$ is ramified.
Note that finite morphisms are integral so your map $\mathcal{O}_Y=k[t] \xrightarrow{t\mapsto t^n} k[t]=f_*\mathcal{O}_X$ makes the latter finite as a $\mathcal{O}_Y$-module with basis $1,t,\dots,t^{n-1}$.
