Complex sentence: The term habitat, comes from ecology, and included many interrelated features, especially the immediate physical environment, and can also include the social environment.
Split into simpler sentences: The term habitat comes from ecology, and includes many interrelated features, especially the immediate physical environment. It can also include the social environment.