Hello @Alex Fang,
Let's examine each statement.
One: yes, you can control the device with one or more direct methods. Each method has a name and a body. In the device, you listen for incoming messages (part of the logic) and after handling the method, a response can be given. Direct methods can time out. The device needs to be connected while a Direct method is called. Synchronous usage.
Two, yes, desired properties are typically used to set configuration settings for a device. When set while a device is connected, it will get an event. After reading the (new) desired properties, it can report back how it reacted to the desired properties (an 'echo' of the same properties is a common solution). If the device wakes up later than the moment the settings were set, it can read out the latest desired properties. This way you can compare large groups of devices and check which devices have picked up the desired properties and which have not. Asynchronous usage.
Three: yes, Cloud messages are the odd one. These are a bit like direct methods (without a response) but these are queued. A device can read cloud messages (it actually get all message still in the queue). The device has to confirm the retrieval of each message, otherwise, it stays in the queue. Asynchronous usage.
Four: You are probably programming your device with custom code like Python or C#. So yes, next to sending messages to the cloud, you also need to program how to handle incoming direct methods, desired properties, or cloud methods. The SDKs available in multiple programming languages take a lot of the heavy lifting away.
Check out the free learning modules for more details.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.