Internet of things (IoT) becomes a prominent technology in our world. It is enabling the connection between the objects (the 'things') and the backend systems via the Internet. Everyday objects can become connected and smart. It has been adopted in different areas and applications such as smart cities, smart agriculture, smart healthcare, smart manufacturing, and others. Moreover, IoT platforms are currently growing up in the market. Each platform provides valuable and specific services and features. This paper presents a survey on IoT platforms, discussing their architectures and fundamentals of IoT building elements and communication protocols between them. This paper aims to help the reader choose a suitable and adequate IoT platform for own demands in the huge number and variety of platforms available. This survey provides a comprehensive view of the components and features of the state-of-the-art IoT platforms.