
Explanation

Box 1: Azure Functions
Azure Function is a (serverless) service to host functions (little piece of code) that can be used for e. g. event driven applications.
General rule is always difficult since everything depends on your requirement but if you have to analyze a data stream, you should take a look at Azure Stream Analytics and if you want to implement something like a serverless event driven or timer-based application, you should check Azure Function or Logic Apps.
Note: Azure IoT Edge allows you to deploy complex event processing, machine learning, image recognition, and other high value AI without writing it in-house. Azure services like Azure Functions, Azure Stream Analytics, and Azure Machine Learning can all be run on-premises via Azure IoT Edge.
Box 2: An Azure IoT Edge device
Azure IoT Edge moves cloud analytics and custom business logic to devices so that your organization can focus on business insights instead of data management.
References:
https://docs.microsoft.com/en-us/azure/iot-edge/about-iot-edge