These things are always hard to explain via text over a forum, but the irreps are determined by considering what happens to the various orbitals in the molecule formaldehyde when the various symmetry operations in the C2v point group are applied. Technically what you need to do is conjure up matrices for each symmetry operation that transform the beginning vectors (before the operation) to the ending vectors (after the operation). In practice only the trace (character) of each transformation matrix matters. Because an orbital transformation only contributes to trace of the matrix if it is left unchanged in position during a symmetry operation (because only the diagonal elements count toward the trace), you just need to look and see if the symmetry operations change the location of each orbital in space (and its orientation).
Ok, that's all rather abstract, so let's just do it. You have four symmetry elements. I'll do the first two for you, then you determine how the other two make sense. The first is E, which doesn't change the position or direction of any orbital. Which means it contributes a +1 to the character for each orbital. That's a 10. The E character is always just going to be equal to the dimensionality of the irrep you're trying to build. Easy. How about C2v? This axis runs right down the middle of the molecule, along the axis formed by the C=O bond. If you do a rotation around this axis, the two hydrogen atoms (and their corresponding 1s orbitals) change positions. They therefore contribute nothing to the trace of the transformation matrix because they are off-diagonal elements. The C and the O both are on this axis, though, and so doing a rotation around this axis does NOT change the position of these atoms in space, or any of the orbitals on them. The S orbitals are spherically symmetric and have no directionality. Therefore a C2 rotation changes neither their location in space OR their orientation, and so they both contribute a +1 to the trace of the C2 transformation matrix. P orbitals on the other hand DO have a directed orientation along a single direction (but are circularly symmetric in the other two directions). The Pz orbital lies along the C2 axis, and thus doing a rotation along this axis does not change its orientation or location in space, so the Pz orbitals on both C and O contribute +1 to the trace of the C2 transformation matrix. The Px and Py orbitals are different, however, because they are oriented perpendicular to the C2 axis. If you rotate 180 degrees around the C2 axis, the Px and Py orbitals on both C and O flip so they are facing the opposite direction as they were to begin with, although they have not changed their spatial location. Therefore each of these orbitals contributes a -1 to the trace of the transformation matrix.
Summing all that up, you get 0, 0, +1, +1, +1, +1, -1, -1, -1, -1, for a total character (sum of all diagonal elements) of 0 for the C2 operation.
Now, see if you can figure out why the mirror planes are what they are. Remember, any orbital that changes its spatial location during a symmetry operation contributes 0 to the trace, any orbital that retains its spatial location AND retains its directional orientation contributes +1 to the trace, and any orbital that retains its spatial location BUT flips its directional orientation contributes -1 to the trace.
(Note: This is an easy case in that the only flips are going to be 180 degrees, so directional orientations are going to only be +1 or -1. In some molecules, rotations can be 90 degrees, 120 degrees, and so forth, in which case you would have to figure out the contributions with trigonometric functions.).