The difference between homeowners insurance and renters insurance is that renters insurance covers your possessions (the things you keep inside your home) but does not cover your home itself (the actual building). On the other hand, homeowners insurance covers both your personal property and the building you live in.
Renters insurance doesn’t cover your building because, as a renter, you aren’t financially responsible for it. Maintaining the building is your landlord’s job, and their own insurance policy will cover it.
Note that homeowners and renters insurance policies are very similar in most other respects. Both provide personal property coverage (even for items stored outside the home), personal liability coverage, and loss-of-use coverage.