They can go to others in the same building, or with their portrait.
People in portraits can visit any other portrait in the same building as theirs. They’re also able to physically interact with the other wizards in those portraits.
“They walked along the corridor, through a set of double doors and found a rickety staircase lined with more portraits of brutal-looking Healers. As they climbed it, the various Healers called out to them, diagnosing odd complaints and suggesting horrible remedies. Ron was seriously affronted when a medieval wizard called out that he clearly had a bad case of spattergroit.
‘And what’s that supposed to be?’ he asked angrily, as the Healer pursued him through six more portraits, shoving the occupants out of the way.”
- Harry Potter and the Order of the Phoenix, Chapter 23 (Christmas on the Closed Ward)
They can also go into things on the wall that aren’t portraits - the Fat Lady once hid in a map.
“And the Fat Lady, sir?’
‘Hiding in a map of Argyllshire on the second floor. Apparently she refused to let Black in without the password, so he attacked.”
- Harry Potter and the Prisoner of Azkaban, Chapter 9 (Grim Defeat)
They can go to any building where there’s a portrait of them, but they can’t just leave the building and go anywhere they want if there’s no portrait of them there.
“Everard and Dilys were two of Hogwarts’s most celebrated Heads,’ Dumbledore said, now sweeping around Harry, Ron and Professor McGonagall to approach the magnificent sleeping bird on his perch beside the door. ‘Their renown is such that both have portraits hanging in other important wizarding institutions. As they are free to move between their own portraits, they can tell us what may be happening elsewhere …”
- Harry Potter and the Order of the Phoenix, Chapter 22 (St Mungo’s Hospital for Magical Maladies and Injuries)
In addition, they’re also able to go to other portraits that are in the same building as their other portrait as well - this ability isn’t restricted to only one building with their portrait.
“Anyway, they carried him up a few minutes later. He doesn’t look good, he’s covered in blood, I ran along to Elfrida Cragg’s portrait to get a good view as they left –”
- Harry Potter and the Order of the Phoenix, Chapter 22 (St Mungo’s Hospital for Magical Maladies and Injuries)
Everard is able to hop between portraits in both locations he has one.
J.K. Rowling also mentions these rules for portraits in an interview.
So the other two reasons that I have for him not to speak to Dumbledore’s portrait, first of all, I created a lot of rules for this world and then later had to navigate my way around them. But this rule was always good, and the rule was that portraits could only move between portraits in the same building. so if I’m in a picture and you’re in a picture and we’re both in Carnegie Hall, then we can move into each other’s pictures. Otherwise we can only move only to other places where we have a portrait. You can’t just move willy nilly through all the – the Louvre, the Met – you can’t do a world tour, as a picture person. You are limited by geography.
- Carnegie Hall interview (October 20, 2007)