Air pollution has a major impact on human health, especially in cities, and elevated concentrations of PMx are responsible for a large number of premature deaths each year. Therefore, the amount of PM10 in the air is monitored and forecasts are made to predict the air quality. In Poland, mainly deterministic models are used to predict air pollution. Accordingly, research efforts are being made to develop other models to forecast the ambient PM10 levels. The aim of the study was to compare the machine learning models for predicting PM10 levels in the air in the city of Lublin. The following machine learning models were used: Linear regression (LR), K-Nearest Neighbors Regression (KNNR), Support Vector Machine (SVM), Regression Trees (RT), Gaussian Process Regression Models (GPR), Artificial Neural Network (ANN) and Long Short-Term Memory network (LSTM). The collected data for three consecutive years (January 2017 to December 2019) were used to develop the models. In total, 19 parameters, covering meteorological variables and concentrations of several chemical species, were explored as potential predictors of PM10. The data used to build the models did not take into account the seasons. The algorithms achieved the following R2 values: 0.8 for LR, 0.79 for KNNR, 0.82 for SVM, 0.77 for RT, 0.89, 0.90 for ANN and 0.81 for LSTM. Research has shown that the selection of a machine learning model has a large impact on the quality of the results. In this research, the ANN model performed slightly better than other models. Then, an ANN was used to train a network with five output neurons to predict the approximate level of PM10 at different time points (PM level at a given time, after 1 h, after 6 h, after 12 h and after 24 h). The results showed that the developed and tuned ANN model is appropriate (R = 0.89). The model created in this way can be used to determine the risk of exceeding the PM10 alert level and to inform about the air quality in the region.