The 'devote' command allows you to devote yourself to a deity.
devote <deity> devote none
You may devote yourself starting at level 5. Devoting allows you to supplicate your deity for special boons if your favor is high enough. Also, when your favor is high, you will receive a small bonus to your combat abilities.
You may change your mind and devote to a different deity at any time. However, if you leave your deity for another, your favor is set to -2500 and you are blinded for a period of time. You must 'devote none' first before devoting to a new deity.