There are a number of different ways to pose this connection. One way is to view the Fourier transform of a periodic function as a distribution, in which case it is a sum of Dirac deltas with weights corresponding to the coefficients in the Fourier series. In this sense the Fourier transform is really the fundamental object.
Another way is to realize the Fourier transform as a limit of Fourier series. Specifically, you can take a function and cut it off outside some large interval. Then you can take the Fourier series of the new function on the interval. Note that there are some questions about how this Fourier series converges if the new function is not periodic. But we are at least guaranteed convergence in $L^2$ if the original function was $L^2$.
Now when you take the size of the interval to infinity, these Fourier series converge in a sense to the Fourier transform. What is going on here is that as the space scale you are considering gets larger, the frequency gap between the relevant Fourier modes is getting smaller. (This is a variant of the uncertainty principle.) As the space scale gets very large, the frequency gap becomes very small, until in the limit there is a continuum of frequencies.