Fish and all other animals have an immune system. When something (bacteria, virus, fungi, parasite) attack their body their body responds with ways to fight off the invader. In fish, the slime coat is the first layer of defense. The fish can shed extra slime coat when a parasite attacks, and this often sheds the parasite, too. I think this is part of the reason Ich does not kill its hosts in the wild- far fewer Ich organisms, and the fish can get rid of the few that reach it. But in an aquarium the concentration of Ich organisms is way higher, and the fish immune system cannot cope with that many.
This response may be strong when the fish is healthy (proper nutrition, correct water parameters) or weak if the fish has been stressed (poor living conditions, competition from tank mates, poor food, other recent illness and other reasons).
The invading organism lives in the fish the same as similar organisms live in us or any other animal. Takes nutrition from the host, grows, reproduces.
Each organism has its own way of reproducing, but they all do reproduce. Depending on the organism the 'babies' might be spores, or any of several other terms.
When these reproductive cells contact a host they start growing.
Most disease causing organisms in fish spread via the water. That is, at some part of their life cycle they spend some time drifting free in the water. Thus, a UV sterilizer can help against many different infections. Water changes will reduce the population of free-swimming organisms. I think some free swimming organisms may concentrate in low flow areas of the tank, such as in a cave or under an arch of wood or similar places that the fish tend to hang out. The fish shed some of the reproductive phase of the disease or parasite, and poor water movement does not flush them away, so the next fish that rests in this hide-away has a larger population of disease or parasite organisms to deal with. Some organisms need to be eaten by the host before they can infect the host. Many internal parasites are like this. Some diseases are like this. Very little spread while the first host is alive, but rampant spreading once the host is dead. Either the disease organism leaves the dead host and drifts in the water, or else the dead host is eaten by the other fish, which then get sick. Neon Tetra Disease is like this. Sure, it can spread through the water. But it spreads a lot faster if the dead fish is eaten by the other fish.
Most diseases can be spread from tank to tank on shared tools and equipment, especially if the tool is carried wet from one tank to the next. Dipping the tool in a disinfectant between tanks can go a long way in minimizing the spread of infection. Having separate tools (especially for a hospital or quarantine tank) can prevent the spread.
Washing your hands between tanks can help.
When you buy new fish put them in a quarantine tank for a month to make sure they are not carrying any disease or parasite. You can treat them in the quarantine tank as needed so your display tank stays free of most diseases and parasites.
Many aquatic organisms cannot tolerate drying out, but this varies, and I would not trust this as the only method of reducing the spread of diseases via tools.