In Nethack, alignment is a numerical measure of how lawful, neutral or chaotic you are. You cannot determine the exact value of your alignment unless you are in wizard mode, but you can tell what range it's in from a stethoscope or a wand or potion of enlightenment. For example, if you are "piously aligned", that means that your alignment is at least 20.

Generally you don't need to worry about alignment. It goes up as you kill hostile monsters, and if you are piously aligned, it makes no difference exactly how piously aligned you are. You need to be piously aligned in order to go on the quest, but this is only likely to be a problem for pacifists, who cannot kill monsters and must find another way to improve their alignment.

If your alignment is negative, you cannot safely pray, and you will convert yourself if you try to convert an altar. The in-game terms for negative alignment are that you are "insufficiently neutral" (or lawful or chaotic) and that you have "strayed", "sinned" or "transgressed" in order of increasing seriousness. The commonest cause of bad alignment is excessive killing of pets and peaceful creatures.