What exactly happens when vegetable oil is partially hydrogenated?
You actually don't need a polyunsaturated fat to be partially hydrogenated. The "partial" refers to the macroscopic view of the fat, rather than a per-molecule basis. That is, if you have, say, one mole of monounsaturated fats and hydrogenate the double bond in half a mole of them, then you've partially hydrogenated the original mole of fat. Taken individually, each molecule has either been hydrogenated or it's still monounsaturated - no single molecule has been "partially hydrogenated". However, the mole taken as a whole has only been partially hydrogenated - 50% of the double bonds that were originally present have been hydrogenated.

Regarding trans fats, the important thing to realize is that (parts of) the hydrogenation reaction is reversible. The addition of molecular hydrogen is not concerted. Each hydrogen is added in a step-wise fashion (roughly). It's in that one-hydrogen added, one-to-go stage where the reaction can reverse course and go back to a double bond. But prior to reforming, the catalyst has broken the double bond and you have free rotation around it. Which way it's put back together is a matter of chance.

So you start with a fat which has all cis bonds. (Because the stereo and regio-selective enzymes that make them only make cis fats.) You then start the hydrogenation process. Each time you add hydrogens some goes to completion, and you end up with saturated bonds. But a fraction of the reactions get part way and then reverse. But as the hydrogenation catalyst is not stereo- and regio-selective, it's just as happy reversing to a trans bond as it is to a cis bond. So it's those bonds - the ones which go part way and then reverse - which end up as the trans fat in the final product.

The reason why fully hydrogenated fats don't have this issue is because they're produced with an excess of hydrogen. Yes, some of the double bonds react part way and then reverse to trans fats, but the catalyst is not stereo- and regio-selective, and it's able to convert the trans bonds to saturated bonds just as easily as the cis bonds. All the trans fats that get formed in the reaction are subsequently destroyed by the complete hydrogenation.