How is bail granted?

This written permission may be granted on the condition that a certain sum of money is paid to guarantee that the accused appears in court.