As children don't get chickenpox for the next time because their memory cell gains information about it. So why this don't happen in case of dengue, malaria also?
There are several ways in which malaria can come back without being re-infected again. The blood forms of the parasites can sometimes persist at low numbers, so that the patient no longer has any symptoms; if these blood forms begin to reproduce again, the patient will once again begin to feel sick and have malaria symptoms. This is known as ‘recrudescence’ and can occur as quickly as within the same year as the initial infection but also as long as fifty years later, depending on the type of malaria! Treating the infection thoroughly, and being tested for parasites after treatment, is one way to avoid recrudescence.
The other way in which malaria can come back is through ‘recurrence’, which is when the malaria parasite enters a dormant phase which resides in the liver. Again, the patient will feel no symptoms while the malaria is dormant, but once these liver stages change into the blood stages and reproduce, symptoms will reoccur.
If you are asking for immunity development after one episode as it happens with some infections, it is not a rule and it does not happen with malaria.