You bring the light from a pulsed laser to a very tight focus inside a photoresist -- the same type of chemical used in standard photolithography. When this photoresist absorbs light with a wavelength of, say, 400nm, it cross-links to become a fairly solid plastic. In normal photolith, you'd illuminate a controlled area with 400nm light.
In two-photon polymerisation, you start with light of, say, 800nm, and you rely on two photons being absorbed at the same time, which together have enough energy to do what a single 400nm photon could. The key here is that, since the probability of this two-photon process depends on the square of the intensity, rather than linearly as in the case of normal one-photon processes, then you can localise it much better: with a tight focus, the chance of polymerising a ~100nm region near the focus is pretty much unity, while the chance of polymerising something away from the focus is pretty much zero. You then move that spot around inside the a blob of photoresist on a microscope slide.
Have a look at
Nanoscribe GmbH for a commercial device, with images of some things they've made.