As long as it's just a few brown spots you can simply cut them out and throw them away. If the majority of the pineapple is brown go ahead and toss the whole pineapple.