As heart disease has become the leading cause of death worldwide, early and accurate prediction is crucial to help doctors make initial judgments about patients and improve their survival rates. This study aims to improve the accuracy and efficiency of heart disease prediction through Machine learning (ML) methods to help medical diagnosis. A heart disease dataset was used in the study, and multiple ML models were used to analyze multiple key health features, and the model performance was verified through a test set. This paper concludes that Logistic regression and random forests perform well in this task and have high practical value. Future research can stack models and optimize data sources to improve the practical performance of the model. This study provides a basic framework for building an intelligent medical auxiliary diagnosis system, which helps to achieve early prevention and timely judgment of heart disease, thereby improving the overall efficiency of medical services.