The best way to feel good and get an orgasm out of it is gently grinding/pushing against a good spot
That one guy that spams anal threads with medical information is correct so be careful first and foremost. Remember that porn is only good from a visual perspective, from my experiences softly grinding or slowly kind of prodding at a good spot is the best way to 'orgasm' from anal. You get a really good feeling all the way up your body that gets really intense and then slowly dissipates, it feels really good but very different from a regular penile orgasm. There's no ejaculation either.
An aneros is the easiest way to get there, I generally lie on my side in a sort of half fetal kind of position and lightly contract the muscles just behind the anus in a soft and rapid rhythm, something easy to keep going without thinking about it as it becomes really difficult to know what you're doing down there as your orgasm builds up and you lose it really easily if you don't keep it up.
Dildos are a lot more difficult to 'cum' from but it's not undoable, My best experiences are from a standing positing with the dildo either against a vanity or a wall and like I said above just sort of gently grinding against it, or pushing against it, and sometimes slowly moving it against a good spot. Experiment with the height you hold the base at.
Just know that once you start feeling it, keep playing around with what keeps you feeling good. It will probably be tempting to go faster or start thrusting like you see in porn but that will probably just ruin it for you.
and again be careful! The anal avenger is right about everything health related in his spam.