The Cyber-Physical System (CPS) is a term describing a broad range of complex, multidisciplinary , physically-aware next generation engineered system that integrates embedded computing technologies (cyber part) into the physical world. In order to define and understand CPS more precisely, this article presents a detailed survey of the related work, discussing the origin of CPS, the relations to other research fields, prevalent concepts, and practical applications. Further, this article enumerates an extensive set of technical challenges and uses specific applications to elaborate and provide insight into each specific concept. CPS is a very broad research area and therefore has diverse applications spanning different scales. Additionally, the next generation technologies are expected to play an important role on CPS research. All of CPS applications need to be designed considering the cutting-edge technologies, necessary system-level requirements, and overall impact on the real world.