Machine learning with sklearn vs. scipy stats
Yes fitting the data and finding the best fitting line is called training the model. 
If you look at the source code of scikit-learn linear regression you can find the its using scipy linalg.lstsq module for finding the coefficients and intercept (most cases). See the source code for more details . Machine learning is fancy word for Application of  mathematics (on data mostly) using computers (machines)