How to prevent selfish mining?

I’m exploring the topic of selfish mining attacks and how to detect and stop them. I do not really understand any of given solutions. Can someone please explain in plain English, how selfish mining gets detected, how to stop it from happening and how to react to it when the attack happens? Were there any selfish mining attacks so far? Were there any mitigations of the selfish mining attack added to the Bitcoin protocol since it was described?