Some more details...
You can change your alignment by offering (press O) small amounts of gold on the altar (1 at a time as fine). At some point, you'll receive a message saying "Welcome believer!" which indicates that your alignment now matches that of the altar. You can also change the alignment of the altar to your own by offering a large sum of gold (3000 at minimum). This carries slightly more risk, as the deity that you are trying to change might get pissed at you.
If a monster is standing on an altar, you can try to sacrifice it to your god by pressing O as well. Only do this if the altar is aligned with you (the only thing you can do with an unaligned altar is convert yourself or it). Even then, it might not work, as gods don't like all types of sacrifices. Be warned... if YOU are standing on an altar and a monster of the right alignment comes around, it can sacrifice you, prematurely ending your career. This is particularly true of chaotic altars, where monsters can sacrifice you even if your alignment is also chaotic (lawful and neutral gods won't accept sacrifices of their own alignment).
Hoping to win with every class, doomed. Archer, Barbarian, Bard, Beastfighter, Druid, Elementalist, Farmer, Fighter, Monk, and ULE Priest down.