How is this a bijection? Consider $ \mathbb{Z} /n \mathbb{Z} $ the ring of all integers modulo $n$.
My textbook says that $ x \rightarrow kx $ is a bjiection, in the case that $\gcd(n,k) = 1$.
That first means to me that for every element $a \in \mathbb{Z}$ I can write it as a composite of $a = b + kn$, so it is congruent to $b$ which is clear to me.
But here is what I dont understand: if the function is a bijection I should be able "inverse"-map a $ b\in \{1, \ldots, n \}$ back into its original $x$
Can you clear this up to me why or how this is a bijection?
The way I see it the function is surjective but not injective. 
 A: We show injectivity of the function $f: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z}: [x]_n \mapsto [kx]_n$ where $\gcd(n,k) = 1$
Because $\gcd(n,k) = 1, [k]_n$ has an inverse $[k]_n^{-1}$in $\mathbb{Z}/n\mathbb{Z}$
So, to show injectivity, assume $f([x]_n) = f([y]_n)$ for $[x]_n,[y]_n \in \mathbb{Z}/n\mathbb{Z}$
Then: $[xk]_n = [yk]_n\Rightarrow[x]_n[k]_n = [y]_n[k]_n\Rightarrow [x]_n[k]_n[k]_n^{-1} = [y]_n[k]_n[k]_n^{-1} \Rightarrow [x]_n = [y]_n$
so $f$ is injective. 
You can also notice that a surjection of a finite set onto itself  is an injection, so the above was actually redundant.
You should also show that $f$ is well-defined, which I leave as an exercise.
A: More generally,

If $G$ is a finite group of order $n$ and $\gcd(n,k)=1$, then the map $x \mapsto x^k$ is a bijection.

(it is not necessarily a homomorphism if $G$ is not abelian)
Indeed, write $an+bk=1$ with $a,b \in \mathbb Z$. Then
$$
x = x^1 = x^{an+bk} = x^{an} x^{bk} = (x^b)^k
$$
and so the map is surjective. Since $G$ is finite, the map is a bijection.
A: It's probably better if we write $[a]$ to denote the residue class of $a\in\mathbb{Z}$ modulo $n$.
The map you're given is $f\colon [a]\mapsto k[a]=[ka]$. 
First we can note that the map is not injective if $\gcd(k,n)\ne1$. Indeed, if $d>1$, $d\mid k$ and $d\mid n$, we can write
$$
n=dn',\quad k=dk'
$$
and so $kn'=dk'n'=k'n$; therefore
$$
f([n'])=[kn']=[k'n]=[0]=f([0])
$$
whereas $[n']\ne[0]$.
Thus $\gcd(k,n)=1$ is necessary for the map being injective.
It is also sufficient: suppose that $f([a])=f([b])$. Then $[ka]=[kb]$, which means
$$
k(a-b)=cn
$$
for some $c$. Since $\gcd(k,n)=1$, we conclude that $n\mid(a-b)$, so $[a]=[b]$.
Now the set $\mathbb{Z}/n\mathbb{Z}$ is finite, so a map from the set to itself is surjective if and only if it is injective.
How do you find the inverse map when $\gcd(k,n)=1$? Use Bézout’s identity: $1=kx+ny$ for some integers $x$ and $y$. Then the map $[a]\mapsto x[a]=[xa]$ is the inverse.
