We say a map $f:X \to Y$ is compact if compact sets are mapped to compact sets.
If $f:X \to Y$ is a compact bijection, must it be continuous?
The bijection condition is necessary. Otherwise consider an appropriately constructed piecewise constant function $\mathbb{R} \to \mathbb{R}$ as a counterexample.
You might notice I never specified what exactly $X,Y$ are. Let us first consider simply the case where $X=\mathbb{R}^n$, $Y=\mathbb{R}^m$. If that holds, then work our way up to $X,Y$ being generic metric spaces. If that holds, then work our way up to $X,Y$ being topological spaces [EDIT: it's not true for general topological spaces, see the comments].
Yes, this is true for any metric spaces or more generally for any compactly generated Hausdorff spaces. A space $X$ is compactly generated if a subset $A\subseteq X$ is closed iff $A\cap K$ is closed in $K$ for all compact subspaces $K\subseteq X$. Equivalently, $X$ is compactly generated iff every map from $X$ to another space which is continuous when restricted to every compact subset of $X$ is continuous. Note that any metric space is compactly generated, since closedness of sets is detected by convergent sequences and the closure of any convergent sequence is compact.
Here is the precise statement in what seems to be the maximal generality.
To show that $f$ is continuous, it suffices to show its restriction to any compact subset of $X$ is continuous. So, let $K\subseteq X$ be compact. Then the restriction of $f$ to $K$ is a closed map, since $Y$ is Hausdorff. This means that the inverse of the restriction $g:f(K)\to K$ is a continuous bijection. Since $f(K)$ is compact and $K$ is Hausdorff, this implies $g$ is a homeomorphism. Thus $f|_K=g^{-1}$ is continuous, as desired.
Here are some quick examples to show each of the hypotheses above are needed.