Malware poses persistent cybersecurity challenges due to its continually evolving sophistication, driven by rapid innovation. These attacks have far-reaching impacts on our daily lives. Traditional signature-based methods, reliant on predefined patterns, struggle to keep pace. In contrast, Machine Learning (ML) and Deep Learning (DL) models can learn from extensive datasets, uncovering hidden patterns that elude human analysts. Furthermore, ML and DL algorithms efficiently process large volumes of data, adapt to new samples, and analyze software or system behavior to identify malicious activities. Thus, ML and DL algorithms play a vital role in fortifying computer system security by detecting and thwarting penetrating malware executions. Despite recent advances in ML and DL techniques, existing research reveals noticeable gaps in malware analysis and detection stemming from insufficient data preprocessing, inclusion of multiple datasets, and hyperparameter tuning. This study employs various ML and DL models, encompassing K-Nearest Neighbor (KNN), Decision Trees (DT), Logistic Regression (LR), Support Vector Machine (SVM), and Random Forest (RF), along with a 6-layer Convolutional Neural Network-Long Short-Term Memory (CNN-LSTM) model. Our results showcase significant improvements, with model accuracies ranging from 0.96 to 0.99 compared to previous studies. Collectively, ML and DL algorithms play a pivotal role in enhancing computer system security through effective malware intrusion detection and prevention.