The first thing to appreciate is that antennas are indiscriminate, by which we mean they do not really care what the energy (signal or protocol) contains, they are merely concerned with its presence (frequency) and levels (strength). It is the modulation scheme that carries the real data and in order for the backend to recover this it is important that the antenna is designed in sympathy with this. In fact, an antenna will behave in exactly the same way when it is both receiving and transmitting; known as the theory of reciprocity. Of course, this also means that it doesn’t really matter if the device is a transmitter, a receiver or both, the antenna design will be the same.
In terms of the devices typically being deployed as part of the IoT, an antenna will be classed as either embedded, meaning it would be mounted directly on the PCB and connected using copper tracks, or cabled, which means it is connected to the PCB using a (normally coaxial) cable. Cabled antennas are often mounted inside the enclosure, but of course, antennas may also be mounted outside the main enclosure or, in some cases, on the outside of a building.
As part of the antenna design or selection it is relevant to consider several criteria, including the data rate needed, the frequencies being used and range of the wireless connection, which will impact the system power levels. Many of these criteria will be common across a range of applications and so it is not surprising to know that they are already defined in specifications for wireless protocols, such as Bluetooth, Wi-Fi, LoRa and many others targeting the IoT and various other applications, such as wireless networking and remote metering.