what does %matplotlib inline mean?
%matplotlib inline is a magic command for IPython that allows you to add plots to the browser interface. It's not for the the terminal.
Sounds like you are using the Python interpreter at the command line, which isn't going to be useful for you as a beginner. Install jupyter notebook and use it instead of the command line interpreter to follow along with your course.
You do need to import IPython into your script (like any other module) if you want to use their functions during your script. This is not the same as installing a dependency from pip where it is downloaded and saved to your python local environment.