It is generally safe, unless of course it has been sitting around for a LONG time. The flesh of apples turn brown due to oxidation. One way to help stop this from happening is to put the apple in lemon juice. The acid helps stop this from happening so quickly.
Have you ever seen raw hamburger that is brown on the top, but when you get in to it, it is red? It is basically the same thing. It is the oxygen that causes this to happen (oxidation).
If the apple is kept at a safe temperature, it will not hurt you to eat it, even if it is a little brown.
If the apple is not kept at safe temperature after being cut, as a general rule, 4 hours should be the cut off for eating it without worries.