LoRaWAN-Actuator Control Remotely

Hello everyone, I am new to working with LoRaWAN. I have several questions about it. I have a LoRa CubeCell HTCC AB-01 module (Heltec) and a UG87 gateway (Ursalink). I am working with them to develop a remote control project for an actuator. The module can be programmed in Arduino IDE. I have run the tests using the examples provided by Arduino: LoRaSender, LoRaReceiver, Ping-Pong and LoRaWAN, and they have all worked in the module correctly. I would like to know some things:

  1. How does the LoRaWAN sample code work? What exactly does it do? What does it consist of?

  2. How to send the information that the module sends and that TTN receives to a local server to be able to work with it (manipulate, classify, filter, etc.)?

  3. How to modify the code that is loaded to the module so that it can remotely control an actuator?

Any information you can offer me will be very helpful. Thank you.

2.You can get the related information in TTN.
3.Modify the code of red box:

Hi, thanks for your help. I would like to know, if it is not a nuisance, that you indicate to me how I should change the code in such a way that I can control the lighting of a Led, every time I send a specific command it can be “ON” the led will turn on, it may be that you explain to me through an example. I have looked for examples explained about downlink but I have not found for that specific module. Thank you.