If it's wild birds, put food out for them, they'll come back constantly -- cute and happy, haha.
If it's a pet, take it out and let it hang around with you. Talk to it, pet it. Like any living thing, they want love and friendship.
*I've had birds and take them out and let them just hang out in a room with me. You can also "potty train" them which would make it easier on the cleaning while they're out. They also sell flight suits with little diapers:)
My birdies have been great little companions thanks to the dedication and time I've given to them.
Also, having a variety of toys and treats helps -- also, a good tip is to change everything around in their cage every month for something new to them.
The bigger the cage, the better as well -- Right now I have 1 lovebird and she has a cage for an African Grey all to herself -- great for spreading her wings when I can't take her out!