Transitioning between land and water
Overview
If competition exists, it can be quite difficult if not impossible for a terrestrial species to become established as an aquatic species, or vise versa. An example would be taking a rainforest plant and putting it in a savanna: Even if it has features that would allow it to just barely survive, the existing flora have already had time to get established and become specialized in their environment. As a result, the new species would be out-competed before it could get established (although this might be less of a problem if occupies a new niche).
Because of this, these kinds of transitions generally occur through adaptive radiation-- That is, when a change in the environment occurs, such as the extinction of existing competing flora and fauna.
Plants (Polyphs)
Land to water
People familiar with keeping terrestrial plants know that overwatering is something to avoid, as it suffocates the roots of the plant. Natural gaps in the soil allow oxygen to diffuse throughout it, making it accessible to the roots. When these gaps are filled with water, while oxygen can still diffuse through it, it's diluted to the point that the plant cannot make effective use of it. As a result, taking a terrestrial plant and plopping it into the water will often kill the plant.
Instead, the plant will need adaptations to allow it to exchange gases underwater effectively. Completely-submerged plants will sometimes use all of their tissues for gas exchange, absorbing gasses through their leaves. This can require adaptations such as the thinning of the cell wall to facilitate gas exchange, or creating empty spaces in the stem of the plant to allow gases to diffuse throughout the parts that can't exchange gases as effectively (e.g. aerenchyma).
Aquatic plants have some unique struggles to deal with in addition to gas exchange. The deeper the water, the harder it is for light to penetrate to support the plant's photosynthesis. Some semi-aquatic plants deal with this by floating at the surface of the water, which also makes gas exchange simpler by exposing the leaves to the air.
Aquatic species may also need to be able to endure algae blooms. Algae blooms deprive the water of oxygen, which can cause species with higher oxygen requirements to die off if they cannot adapt.
Transitioning to freshwater is easier than transitioning to saltwater, as plants generally do not like salt.
Water to land
Animals (Muscals)
Land to water
Water to land
A species transitioning from being fully aquatic to a terrestrial lifestyle, in most cases, has to worry about retaining moisture. Underwater, this is obviously not a problem, as they are surrounded by moisture. However, on land, evaporation can cause their tissues to dry out very quickly, especially if they do not have any adaptations to help hold in moisture. Amphibious species, like frogs, deal with this by living near water so they can keep their bodies moist. Approaches like this are a good starting point.
Many aquatic species breathe using gills. Gills are composed of numerous filaments through which gases can diffuse from and into the water. Oxygen from the water is diffused into the gills, while carbon dioxide is diffused into the water. Gills can work as long as they are kept moist, which allows animals such as crayfish to survive outside of the water for brief periods of time despite not having lungs. However, for the diffusion process to work efficiently, there needs to be as much surface area exposed to water as possible. When some fish are removed from water, their gill filaments stick together, which is known as gill collapse. When the filaments are stuck together, there is less surface area available, eventually leading to suffocation.