Saddle a pet by applying the saddle to it - you need at least one free hand for this. It is possible to saddle a non-tame monster, but this is more difficult than saddling a pet, and you will not be permitted to ride the monster until it is tamed. To remove a saddle from a monster, use #loot, a knock spell, or a wand of opening. Nymphs and foocubi may also steal a monster's saddle.
Loot won't work if the saddle is cursed.
Cursed saddles also prevent you from dismounting with the #ride command. You cannot uncurse them with a blessed scroll of Remove curse or Holy water. The only ways to get unstuck are to pray to have your god uncurse the saddle, to zap a wand or spell of knock downwards, ride downstairs while Burdened, or to polymorph yourself or your steed into something that can't ride, including eating a mimic.