import matplotlib.pyplot as plt
This line imports the pyplot module from the matplotlib library(package). The matplotlib is a python 2D plotting library.
The "as plt" part allows you to use
plt as a abbreviation for pyplot.
For complete matplotlib documentation, see the website:
https://matplotlib.org/
This is not automatically installed with python, but it's an extremely useful library.