basically a spirit uses you as a channel. you go into a meditative state, hold a pen [and have some paper] and the spirit should begin moving the pen in your hand letting you write out things. it could be single words or full sentences.
that link might help you, it talks about automatic writing, techniques used, what automatic writing is useful for, how to do it correctly, and some things to avoid. your conscious mind can many times give you the answer you seek. with automatic writing you need to quite that part of your mind, let your intuition, spirit guide, or whomever you're connecting to speak up.