You can absolutely have two infections occurring together.
One term which is used is 'co-infection'. Also 'secondary infection', in case where either the first infection or the treatment made it more likely for the second infection to occur. For example, secondary infections causing pneumonia were a big issue with Covid19.
I have done a quick google search on 'dengue malaria co-infection', and cases do exist. In this paper (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3614227/ - Concurrent malaria and dengue infection: a brief summary and comment), the authors comment on the fact that for this particular combination of diseases, the co-occurence is indeed quite low. They have various hypotheses:
- The vectors for either disease are specific to geographically distinct areas, e.g. mosquitoes that prefer city vs rural areas.
(I've seen it contradicted in another paper but no time to search).
- Pure statistics: the likelihood of getting both diseases is much less likely than getting one, especially if getting one disease results in behaviour modification (e.g. staying at home sick).
- Underdiagnosis: if you go to the doctor with one obvious disease, you probably will not get tested for other co-infections you might have.
It is possible that, for other pairs of diseases, immunity may play a role (your body is already on high alert from one infection) but that can also provide a risk (your body is so exhausted from fighting infection #1 that you can't fight infection #2). I am not aware, though, of any general statement that would apply to all diseases.