How do you get a golem?

In the context of Pokémon, you get Golem by trading Graveler to another game and back.

Golems are ritually created statues meant to guard synagogues. To create a Golem you need three parts; the will, the body and the heart. The will is a scroll, written in sanscrit with the spell on it. The body is a statue of any description that must be carved prior to the ritual. The heart is your intentions and personal power. Golem require it to keep moving and have been known to drain amateurs to the point of death because they weren't smart enough to let their goal rest.

You don't. For the last couple of centuries, our spiritual level has descended to the point that this has become impossible. Any attempt would result in nothing.
You need to have a Graveler and trade it with a friend.