The neural network is actively taught by a deep learning professional who has access to a good amount of training data. In short, an image of a varroa infested bee is shown to the neural network and we let the network guess. If the network guesses wrong, we let it know. It will then adjust itself very slightly to make a more educated guess next time. By doing this several thousand times the neural network will learn very abstract features and eventually become better than a human at visually detecting mites.
That's a very simplified way of looking at it. In reality, an artificla neural network is a very complex beast that is difficult to tame and comes in many different forms and shapes. One of the first milestones is for the development team to find the way of training that is optimal for this particular task.