Hogwarts portraits are able to talk and move around from picture to picture. They behave like their subjects. However, the degree to which they can interact with the people looking at them depends not on the skill of the painter, but on the power of the witch or wizard painted.
When a magical portrait is taken, the witch or wizard artist will naturally use enchantments to ensure that the painting will be able to move in the usual way. The portrait will be able to use some of the subject’s favourite phrases and imitate their general demeanour. Thus, Sir Cadogan’s portrait is forever challenging people to a fight, falling off its horse and behaving in a fairly unbalanced way, which is how the subject appeared to the poor wizard who had to paint him, while the portrait of the Fat Lady continues to indulge her love of good food, drink and tip-top security long after her living model passed away.
However, neither of these portraits would be capable of having a particularly in-depth discussion about more complex aspects of their lives: they are literally and metaphorically two-dimensional. They are only representations of the living subjects as seen by the artist.
Some magical portraits are capable of considerably more interaction with the living world. Traditionally, a headmaster or headmistress is painted before their death. Once the portrait is completed, the headmaster or headmistress in question keeps it under lock and key, regularly visiting it in its cupboard (if so desired) to teach it to act and behave exactly like themselves, and imparting all kinds of useful memories and pieces of knowledge that may then be shared through the centuries with their successors in office.
The depth of knowledge and insight contained in some of the headmasters’ and headmistresses’ portraits is unknown to any but the incumbents of the office and the few students who have realised, over the centuries, that the portraits’ apparent sleepiness when visitors arrive in the office is not necessarily genuine.