Check out this Greasyfork script: https://greasyfork.org/en/scripts/391615-disable-previews-on-youtube-firefox/code
It runs with TamperMonkey or GreaseMonkey.
No, an API is an application programming interface. Think of it as a way for software to communicate with other software.
As an example, look at https://www.mediawiki.org/wiki/API:Main_page/en
For a basic explanation of what an API is and does see https://www.youtube.com/watch?v=GZvSYJDk-us
You should ask your teacher what ...