The Internet of Things (IoT) is a series of recording devices, mechanical and automated machines, documents, creatures, or individuals that have one of the user identifiers and the ability to substitute information over a network without requiring human-to-human connections. The IoT technology is used in different applications to transfer information between two or more stations or devices using actuators/sensors. The IoT has many fields of application, including smart home, healthcare, transport and logistics, and industry. Each application gives highlights and important and explicit administrations. This paper provides an overview of IoT applications, discussing their current problems and potential challenges. In addition, it focuses on issues and challenges that arise for future IoT systems including enormous scaling, planning and needs, generating information and big data, strength, frankness, resource management, privacy, and security. The secure data transformation is more problematic in ongoing research. So, this survey presents security attacks and different security mechanisms involved in IoT applications including authentication, encryption, blockchain, and trust management. Blockchain with IoT applications provides good secure data transfer compared to other security mechanisms. So, this survey mainly concentrates on the blockchain with IoT applications and its latest issues. The objective of this paper is to analyze the issues and challenges of IoT applications, eight research topics in existing systems, security attacks and their countermeasures, and different security mechanisms confronting the IoT.