Follow the instructions for assembly, which is in the package.
For different walls require different types of fasteners. Pick suitable for your walls screws, dowels, screws and so on. N. (Not included).
Different wall materials can withstand different loads. For example, the drywall can not bear the weight that can withstand the walls of wood, concrete or brick.
If you are not sure what type of fasteners to use, contact a specialized shop.