Be careful with it, wiring power electronics in a manner that they were not designed for can produce unexpected results.
Essentially, you will want to wire the ground of PSU A to the +12v of PSU B, then you will have +24 across the +12v line of PSU A to the ground of PSU B. Note that the ground of PSU A CANNOT be used as ground, and must be isolated from earth ground and the ground of PSU B- that is, you can't mount the metal chassis to a common ground. In fact, I think you may even need to snip the ground prong on PSU A's plug. (Be careful!).
Also, you will want to use even loading. ATX PSUs are a tapped coil design, and are designed to have some kind of load on all their voltage lines- that is, +3.3v, +5v, and +12v. +12v will be loaded, but if you're not going to use +5 and +3.3 for anything significant, you should add a dummy load of at least 25% of the ampacity of the load on +12v. That is, if you're pulling 10A from +12v(or the combined +24v, in this case), you will want to put around 2.5A of load on each of the 5V lines. I think you can get away with loading just +5v and not +3.3v- I've done this before. I've always loaded my +5v line so I don't have direct experience with what happens if you don't- I think it just limits the amount of current you can pull from the other rails. Computers usually pull more or less evenly from each rail, so it isn't an issue.
Note that many PSUs also have a -12v line. So there is actually 24v inside you PSU, but the ampacity of this line is quite low. IIRC, the -12v rail supports less than 1A, usually. So you could have a +24v supply if you wired across +12v and -12v(instead of ground), but the capacity would be very low.
YMMV, use this info at your own risk. I'm not 100% about the ground tying, as I mentioned earlier. Before trying to connect any of the grounds, check to see if there is a voltage between them. If there is a significant (1+) voltage, don't try to connect them. If there's less than a volt, feel free to try it, but beware that this is essentially creating a ground loop and can cause interference problems. If it works for you, though, go for it.
What exactly are you doing? If you don't need the power for very long or for a permanent installation, it might be easier to just connect two 12v batteries in series and charge them after.