On a basic level, your ladder needs to be made of a sturdy material, able to hold the expected weight it’ll be subjected to, and (ideally) produced by a recognised brand. All of these things will help to make it as safe as possible to use. Beyond that, it should be fit for the purpose you’re going to use it for; not all ladders are intended to be used in the same way for the same task.