How were indulgences made?

Can you answer this question?