Your skin is a barrier from harmful things in the environment. When skin becomes damaged blood quickly clots ( thanks to platelets in the blood ) around the damaged area to form a dry crust, called a scab. This protects your body from any nasties which could take advantage of the new opening in your skin.
It might feel quite satisfying to pick a scab, but underneath there’s a lot going on and the scab is definitely best left in place. There’s dead bacteria, live bacteria, phagocytes ( white blood cells ) and maybe even pus. Pus is yellow gooey stuff which is mostly white blood cells, dead bacteria and skin cells! Macrophages ( a type of white blood cell ) under the scab eat and destroy bacteria. These can call out for extra help from B cells, which produce antibodies to flight infection.
The basic function of a scab is to protect the damaged area while new skin cells are made and any damaged vessels repaired.
If you do manage not to pick them, scabs eventually fall off, revealing the new skin underneath.
Scabs usually start as a red colour which becomes darker as the scab dries and thickens. They often become lighter as the skin heals.
Yellow in a scab is a sign of pus, which is usually a sign of infection and should be investigated by a doctor!
Remember to keep an area of damaged skin, clean and dry.