This document provides an overview of hidden Markov models (HMMs) and their application to gene prediction. It discusses how HMMs can model insertions and deletions in sequence alignments through their graphical representation using states and transitions. The document also explains how HMMs assign probabilities to sequences based on allowed state emissions and transitions. HMMs allow for more flexible modeling of gapped alignments than profiles or patterns alone.