Young people often move out of their parent's home and share a house or a flat with friends. In British English the people they share with are called 'housemates'. It doesn't mean that they share a bedroom, just the same house or flat. The word 'mate' means friend.
In American English I think they use the word 'roommate' to mean 'housemate'.
In British English, a roommate would be a friend who you share a bedroom with. Sometimes when students go away to school or university they have to share a room with someone and so they have a roommate.