In short, renters insurance is what tenants buy to insure their possessions whereas landlord insurance is what the building owner buys to insure the building.
Landlord insurance is the policy that insures against damage to the building itself. If there's fire damage or the building is completely destroyed, the landlord insurance policy pays to rebuild it. The policy may also pay for some of the contents of the building that came with the rental, but mostly the coverage is there for the building itself.
Secondly, landlord insurance also gives the owner protection against liability risk. If someone sues the landlord, the policy can pay for both the legal cost of defending the landlord in court and paying damages if they are awarded or settled. Landlord insurance thus reduces the risk that the building owner would have to sell the building to pay for a liability claim.
Renters insurance is there to give tenants protection against personal property loss, loss of use, and liability. For example, if someone breaks into a storage locker in the apartment and steals an expensive bicycle, renters insurance could cover the tenant's loss.
If the tenant's residence is damaged and they have to relocate while repairs are made, staying in a hotel would be very expensive; renters insurance could cover these costs.
Finally, renters insurance can also provide liability protection for the tenant if they're sued for something like negligently starting a fire.