In my experience "canonical" means "the simplest way possible". Often it turns out that mathematicians come to an agreement (I would not say that this is provable in some formal context) that this way is uniquely determined.
For instance, when we want to embed a domain $R$ into its field of fractions $Q(R)$, the simplest way to do that is to map $r$ to $\frac{r}{1}$. All other formulas either don't work (like $\frac{1}{r}$ for $r=0$) or are more complicated (like $\frac{r^2+1}{1}$).
Experience shows that often (not always!) the simplest way possible also has convenient features as well, for example $R \to Q(R)$, $r \mapsto \frac{r}{1}$ is actually the only ring homomorphism which you can write down for every domain $R$, by which I mean that it is a natural transformation. As a consequence, one often also turns around this suggested meaning of "canonical" and defines it by "unique with respect to some properties we would like to have".
Another example is the projection map $X \times Y \to X$, $(x,y) \mapsto x$. Again this is the simplest way to produce an element of $X$ out of an element of $X \times Y$ (and, by the way, again the only choice which is natural in $X$ and $Y$).
The canonical basis of $K^n$ is another example. Here the simplicity is measured by the number of zeroes in each basis vector, and zeroes should be considered to be simple of course.
In order to illustrate that uniqueness is not required in general, for example one says that there are two canonical maps $X \to X \sqcup X$.