That's an easy one. In the same concept that an AR-15 can be a pistol, an AK 47 can be a pistol too. With the proper features or lack thereof, an AK 47 can be made into its pistol variant, looking something like this.
Akenett said it well enough. An AK--47 pistol contains the same basic build of a regular AK-47. It simply does not contain the stock of the gun, and has a barrel length of under 16". Other than that, it is an AK. Don't go modifying an already built AK-47 into a pistol though. Highly illegal.
The above statements definitely have facts in them, but if you want a more robust answer, we have to delve into why it is called an AK-47 "PISTOL." The term pistol is in fact a legal term used to define firearms of a certain length and type concerning the kind of attachments that are on the firearm itself. Basically an AK-47 pistol takes into account those parameters which make it a pistol, IE, a pistol length barrel (under 16") and no buttstock, which would be able to assist in the shouldering of the firearm.
In terms of attachments, there really isn't much room for one on an AK anyway, but pistols cannot have vertical foregrips, otherwise it will be considered an AOW which would require a tax stamp to own. There are a few other criteria for AOW's but that is the gist for the AK pistol