I am studying statistics on my own and I am not understanding when to use a one sample t test or a test with a normal distribution. As I understand, both are comparing a population mean with a sample mean, so, when should I use each one? And what is the difference between then?
Do you mean when to compare to a t-distribution as opposed to a standard normal distribution? That is because, in the former case, you have to estimate the standard deviation. Chugging through the theory gives you that you compare to $t$, not standard normal.
The details of that should be covered in a statistics textbook. The intuition might not be. The way I think about it is that the standard deviation you estimate might be an underestimate. Thus, you use the thicker tails of the $t$-distribution to keep from getting a dishonesty small p-value.