In Pokémon, Ditto is a pink blob that you can use to transform into enemy Pokémon during battle. But can a Ditto transform into other things? For instance, can it transform into a person and impersonate them?
Yes, and they do in the anime.
Duplica's Ditto, in Episode 37: Ditto's Mysterious Mansion, turns into pictures of people, and in the Professor Oak lecture below, it turns into Oak.
Note: Ditto's beady eyes in this episode are originally said to be abnormal, and he later learns to transform perfectly. Due to its popularity, however, this abnormal transformation was retconned into being the norm.
Dittos are described as being able to reconstitute their cellular structure into the appearance of whatever they see -- be it organic or otherwise.
Furthermore, Duplica's Ditto, when impersonating Team Rocket's Meowth, showed the ability to speak. As Ditto normally can't talk, this means he lifted the ability from his taken form. That would mean, in turn, that a Ditto transformed into a human would similarly be capable of imitating speech. This, combined with their appearance, would allow near-perfect impersonation of people.
As jpmc26 stated in the comments, Transform changes the user's current type, current stats, current stat modifications, current moves, current species, and current cry to that of the target's as well. This establishes a basis for transformation into a person in-game, as well -- it just hasn't happened yet.