It is detectable once it happened. If you run your own node, you can tell when it is "reorganizing", i.e.: discarding one branch for another. One block reorgs, or two block reorgs are somewhat common (citation needed, I don't have the numbers at hand). That's why you see most merchants considering your Bitcoin "paid" only after six confirmations. They are protecting themselves against a Bitcoin reorganization of more than six blocks. The more money you accept, the longer your confirmation period needs to be. Some protocols require 100 confirmations.
What happens to Bitcoin when this happens: to "Bitcoin" the software, nothing. Everything just keeps going. To "Bitcoin" as a currency, your guess is as good as mine. It depends on what the "social layer" (the community - devs/users/stakeholders) decide is the best course of action. This would be considered an emergency event.
EDIT: You might be wondering why it is not detectable before it happens. It isn't detectable before because the attack would be privately mining their fork. That is: they would not broadcast the evil blocks.
What happens to Bitcoin when this happens: to "Bitcoin" the software, nothing. Everything just keeps going. To "Bitcoin" as a currency, your guess is as good as mine. It depends on what the "social layer" (the community - devs/users/stakeholders) decide is the best course of action. This would be considered an emergency event.
EDIT: You might be wondering why it is not detectable before it happens. It isn't detectable before because the attack would be privately mining their fork. That is: they would not broadcast the evil blocks.