The apples are simply oxidizing and turning brown due to the exposure of oxygen. They are still completely fine to eat but if you would like to prevent browning, just add the sliced apples to a bowl of water then drain and dry them before use.