Pneumonia can go away on it's own if it's viral pneumonia and viral pneumonia usually goes away on it's own within a few days to a week.
But if the pneumonia is the bacterial pneumonia then bacteria pneumonia won't go away on it's own and needs medical treatment otherwise it can turn deadly.
If you have bacterial pneumonia and you don't get it treated with antibiotics then the bacterial pneumonia can result in a blood infection, or even an abscess in the lung which can be fatal eventually.
If you think you have pneumonia it's a good idea to see the doctor to make sure it's not a more serious pneumonia which is bacterial pneumonia.