Pandemic has led dramatically loss of human life and a challenge in livelihoods. An international pandemic has been caused by the contagious viral illness COVID-19. A considerable number of COVID-19 deaths are brought on by pneumonia, which is a frequent consequence of the illness. In COVID-19 patients, early diagnosis of pneumonia can enhance clinical outcomes and save lives. In this study, we suggest a modified Convolutional Neural Network-CNN model to predict patients with pneumonia and COVID-19. Dropout regularization, additional convolutional layers, and transfer learning improve the suggested model's performance. In this study attempts to develop a model that has been trained and evaluated using a publicly available dataset of chest X-ray images from COVID-19 patients, pneumonia patients, and healthy individuals.The results demonstrate that the modified CNN model outperforms the original CNN model which gives clear insight for better results on image identification.