23 months ago by
I will risk to post the obsolete answer.
BWA execution from the high level can be observed as creating indexing structures (run bwa index which outputs 5 index files) out of sub-sequences of the reference genome (fasta file) in order to enable search of the sequence w from input reads (fastq format) in constant complexity - O(|w|). Indexing is based on the Burrows-Wheeler transformation (Google video with explanation of BWT and the interview with Mike Burrows https://youtu.be/4WRANhDiSHM?) and FM index https://en.wikipedia.org/wiki/FM-index.
After watching mentioned video and reading wiki you will be ready for the final treat, the BWA MEM paper from its author Heng Li: http://arxiv.org/abs/1303.3997
Hope this was helpful,