If you are a guy, you can thrust between two pillows, the mattress and a pillow, you can fold the pillow and thrust into the groove or wrap the pillow around your penis to make a tube. You can also make a small hole in the casing and thrust into the stuffing inside - this method probably works best with a solid wadding or a foam pillow. If you are a girl, you can ride a pillow and grind your clit and labia against it. You can fold the pillow around a book or make a knot on the corner to make it harder.
Climaxing by pillow humping may take longer than by a conventional hand job, but the orgasm may be much stronger and last longer. That is particularly true if you happen to have a pillow fetish and you find pillows not only comfortable but also sexy. In masturbation, ejaculation into thin air may be disappointing, but cumming against your favorite pillow may be very satisfying.
Pillow humping is also very safe sex, because you cannot catch a STD from your pillow unless you share it with somebody, and you do not need to wear a condom because you cannot get your pillow pregnant.