In an ecosystem, there are many types of interactions between the components of the various species.
We can classify the relationships between living beings initially into two groups: the intraspecific, which occur between beings of the same species, and the interspecific, between beings of different species. It is common to differentiate relations into harmonic or positive and inharmonious or negative. In harmonics there is no harm to any of the associated parts, and in disharmonics there is.
Before we deal with each type of relationship between living things, let us clarify the meaning of two terms: habitat and ecological niche.
The analogy that compares habitat to the address of a species and the ecological niche to its profession is classic. If you want to find individuals of a certain species in the natural environment, you should look for them in their habitat. Your remarks about "the way they live" will be indications of the ecological niche.
The experienced fisherman knows where to find a certain type of fish, which bait to use, whether to sink it more or less, at what time of the year and at what time of day or night he is most likely to succeed. He should know a lot, therefore, about the habitat and ecological niche of the fish he most enjoys.