Pergunta de entrevista da empresa Ampere Computing

How does branch prediction work? What hardware mechanisms alleviate mis-predicts?