Interest and need for Wireless Body Area Networks (WBANs) have significantly increased recently. WBAN consists of miniaturized sensors designed to collect and transmit data through wireless network, enabling medical specialists to monitor patients during their normal daily life and providing real time opinions for medical diagnosis. Many wireless technologies have proved themselves in WBAN applications, while others are still under investigations. The choice of the technology to adopt may depend on the disease to monitor and the performance requirements, i.e. reliability, latency and data rate. In addition, the suitable sensor is essential when seeking to extract the data related to a medical measure. This paper aims at surveying the wireless technologies used in WBAN systems. In addition to a detailed survey on the existing technologies, the use of the emerging Low Power Wide Area Network (LPWAN) technologies, and the future 5G, B5G and 6G is investigated, where the suitability of these technologies to WBAN applications is studied from several perspectives. Furthermore, medical applications of WBAN are discussed by presenting their methodologies, the adopted wireless technologies and the used sensors. Given that each medical application requires the appropriate sensor to extract the data, we highlight a wide range of the sensors used in the market for medical systems. Recent and future challenges in WBAN systems are given related to the power consumption, the emergence of the Internet of Things (IoT) technologies in WBAN and others.