Apple maggots, also called the railroad worm. It is very common, for infesting apples.
Adult female apple maggots are small fruit flies that lay their eggs just under the skin of the apples. They can attack immature fruit starting in June or July and successive flights can continue laying eggs into the fall. The eggs hatch within a few days as larvae. The larvae lack legs; they are plentiful in numbers and serious about tunneling and will proceed to make them throughout the flesh of the apple. While in some cases you can see the tiny entry wound or the skin will reveal the presence of an infestation, often you won’t know until you cut the apple open after harvest.