When you have company, you have people with you who are spending time with you. Someone who keeps you company is a companion. In other words, a companion is someone who spends time with you: someone who hangs out with you, goes places with you, and does things with you. Your companions can be friends or family members, or even pets.
If you're feeling lonely, seek out companionship! Companionship is having someone with you, keeping you company.
If you're a good companion, you're companionable: you're warm, friendly, easy to hang out with, and fun to spend time with.