Human Activity Recognition (HAR) stands at the intersection of machine learning, deep learning, and sensor technology, primarily focusing on leveraging inertial sensors in smartphones and wearable devices. This paper presents a comprehensive technical overview of HAR, examining the amalgamation of machine learning and deep learning systems while considering the data inputs from mobile and wearable inertial sensors. The review encompasses a broad spectrum of methodologies applied to HAR, ranging from classical machine learning algorithms to cutting-edge deep learning architectures. Emphasis is placed on the nuanced challenges and opportunities posed using inertial sensors in smartphones and wearables. This includes discussions on data preprocessing strategies, feature extraction methods, and model architectures, accounting for the unique characteristics of sensor data, such as noise, variability, and power consumption. The paper explores recent advancements, scrutinizing state-of-the-art approaches, innovative model architectures, and emerging trends in HAR. Through a comparative evaluation of various machine learning and deep learning techniques, the review aims to guide researchers and practitioners in selecting the most appropriate methods for HAR applications across diverse scenarios. In conclusion, this paper serves as an inclusive guide to the technical landscape of HAR, incorporating insights from both mobile and wearable inertial sensors. By synthesizing existing knowledge and addressing future research directions, it aims to propel advancements in developing robust and efficient systems for recognizing human activities, accommodating the evolving landscape of sensor technologies in mobile and wearable devices.