Avocados turn black very easily, almost as soon as they come into contact with air.
You must peel them the moment you plan to use them.
For example, if you are planning to make a dip, prepare all the other ingredients first and peel the avocado at the end.
Once you have finished preparing the recipe, make sure you cover it well with cling film which touches its surface.
When buying avocados make sure they are ripe, otherwise they will be hard and tasteless. This means they must be soft but, be careful, not blackened.