For classroom use or to prevent unintentional downloads, you can disable Wolfram Language access to the internet.

Wolfram Language functions access the internet for a variety of purposes:

to access Wolfram servers to establish the valid use of the product or to download incremental product updates
for use in high-level functions to indirectly communicate with or get data from Wolfram servers or specific third-party servers such as the Wolfram Cloud, Wolfram|Alpha, Wolfram repositories or Wikipedia, among others
for use in low-level functions to directly communicate with the internet

Choose , select the Internet Connectivity tab and uncheck Allow the Wolfram System to access the internet:

Notes

To prevent user-written code containing low-level HTTP-request functions from accessing the internet, the installation of your Wolfram product needs to be sandboxed on the operating system level. Please consult with your system administrator for more information regarding sandboxing.
Turning off internet access will prevent Import from URLs, natural language input, access to Entity values and other services that require internet access.