This is not a disease, but a disorder called Bitter Pit (see photo here) which, like blossom end rot in cucurbits (pumpkins, zucchini etc), is caused by a calcium deficiency:
Bitter pit is caused by low levels of calcium in the fruit and poor distribution of calcium within the tree during fruit development. However, it is rarely due to a deficiency of calcium in the soil and can even occur in trees growing on chalk.
Bitter pit is more usually connected with an irregular supply of water, which prevents calcium being taken up and circulated around the tree. Problems are generally worse in seasons when there are wide fluctuations in rainfall and temperature and a shortage of water to trees at critical times during fruit development.
It is also worth noting that excessive use of nitrogen, potassium and magnesium fertilisers can cause or exacerbate the problem.
Royal Horticultural Society/ Bitter Pit
If the pits are only skin-deep:
you can peel and eat the apples, although they may taste a little bitter;
cook or freeze them as soon as possible after harvesting, to prevent the disorder from progressing.
You should be able to control the disorder by:
watering regularly during dry spells so as to minimize fluctuations in the water supply;
mulching around the tree to retain moisture in the soil in summer;
applying a general-purpose balanced fertilizer in early spring (such as Grow More) and avoiding over-feeding.;
pruning lightly in summer to reduce the leaf area and redirect calcium to the fruit.