Increased life expectancy coupled with declining birth rates leads to an aging population structure. Agingcaused changes, such as physical or cognitive decline, could affect people's quality of life, resulting in injuries, mental health or the lack of physical activity. Sensor-based human activity recognition (HAR) is one of the most promising assistive technologies to support older people's daily life, which has enabled enormous potential in human-centred applications. Recent surveys either focus on the deep learning approaches or one specific sensor modality in HAR. This survey aims to provide a comprehensive introduction for newcomers to HAR, including the conventional approaches and the deep learning methods. It specifically puts more emphasis on wearable sensor-based HAR systems. We first describe the state-of-art sensor modalities. We then detail each step of the wearable sensor-based HAR. In the feature learning section, we concentrate both hand-crafted features and deep learned features in HAR. We also present the ambient-sensor-based HAR, including camera-based systems, and the systems which combine the wearable and ambient sensors. Finally, we identify certain challenges in HAR to pose research problems for further improvement in HAR.