Alignment is central to a D&D character's personality. D&D uses two measures to determine a specific character's ethical and moral attitudes and behavior.
The moral axis has three positions: good, neutral and evil. Good characters generally care about the welfare of others. Neutral people generally care about their own welfare. Evil people generally seek to harm the others' welfare.
The ethical axis has three positions as well: lawful, neutral, and chaotic. Lawful people generally follow the social rules as they understand them. Neutral people follow those rules find convenient or obviously necessary. And chaotic people seek to upset the social order and either institute change, or simply create anarchy.
A chaotic good character acts as his conscience directs him with little regard for what others expect of him. He makes his own way, but he’s kind and benevolent. He believes in goodness and right but has little use for laws and regulations. He hates it when people try to intimidate others and tell them what to do. He follows his own moral compass, which, although good, may not agree with that of society. Chaotic good is the best alignment you can be because it combines a good heart with a free spirit.