Anal toys themselves, if they are made to be body-safe in terms of design and material, are not dangerous. A lack of judgment when it comes to your own limitations is, on the other hand.
The most dangerous things to be used as anal toys are things with rough seams/edges/surfaces, things without a flared base and things that just aren't meant to be used anally (such as vegetables). Material safety is also important, especially when it comes to phthalates.
In any case, anal play should be pain-free, enjoyable and done at a safe pace. Someone not used to anal play needs to start with the bare minimum of insertion sizes, such as fingers or very small toys. One can always work their way up, and should never proceed to a larger object unless they are completely comfortable with the current size they use. Stop if you feel pain; if you are hurting, you are moving too fast or doing something wrong (or possibly using a toy/lube that doesn't agree with you).
Speaking of lube, remember to use it. Plenty of it. It is important.
Ramble over. Sorry for not being very concise about it all.