  A code $C$ is called $\mathbb{Z}_p\mathbb{Z}_{p^2}$-linear if it is the Gray
image of a $\mathbb{Z}_p\mathbb{Z}_{p^2}$-additive code. For any prime number
$p$ larger than $3$, the bounds of the rank of
$\mathbb{Z}_p\mathbb{Z}_{p^2}$-linear codes are given. For each value of the
rank and the pairs of rank and the dimension of the kernel of
$\mathbb{Z}_p\mathbb{Z}_{p^2}$-linear codes, we give detailed construction of
the corresponding codes. Finally, as an example, the rank and the dimension of
the kernel of $\mathbb{Z}_5\mathbb{Z}_{25}$-linear codes are studied.
