Porygon is created by putting together Porygon's four individual parts, all of which can occasionally be obtained from crafting PCs or Trade Machines' Parts.
When put into a trainer's inventory, the item will transform into a wild Porygon, which gets spawned nearby.