The detection and localization of water pipe leaks are essential for maintaining the efficiency and sustainability of water distribution systems. Traditional methods, such as visual inspection, acoustic detection, and pressure testing, are often labour-intensive, time-consuming, and may not provide real-time monitoring, leading to significant water loss, infrastructure damage, and increased operational costs. Advances in machine learning and deep learning technologies offer a promising alternative, enabling the development of automated, accurate, and timely leak detection systems. This study presents a simulation-based approach to generate datasets for leak detection and localization within pipe systems. We implemented and compared five models: Ridge Regression, Lasso Regression, Decision Tree Regression, Support Vector Regression, and Artificial Neural Network (ANN). Among these, Decision Tree Regression and ANN demonstrated superior performance in accurately detecting and localizing leaks. Our findings suggest that ANN is particularly effective for leak localization, providing a robust solution to minimize water loss, infrastructure damage, and environmental impact while ensuring the reliability of water distribution systems.