An open reading frame or ORF is a portion of an organism's genome, which contains a sequence of bases that could potentially encode a protein. The start and stop ends of the ORF are not equivalent to the ends of the mRNA, but they are usually contained within the mRNA. In a gene, ORFs are located between the start-code sequence (initiation codon) and the stop-code sequence (termination codon). ORFs are usually encountered when sifting through pieces of DNA while trying to locate a gene. Since there exist variations in the start-code sequence of organisms with altered genetic code, the ORF will be identified differently. A typical ORF finder will employ algorithms based on existing genetic codes (including the altered ones) and all possible reading frames.
In fact, the existence of an ORF, especially a long one, is usually a good indication of the presence of a gene in the surrounding sequence. In this case, the ORF is part of the sequence that will be translated by the ribosomes, it will be long, and if the DNA is eukaryotic, the ORF may continue over gaps called introns. However, short ORFs can also occur by chance outside of genes. Usually ORFs outside genes are not very long and terminate after a few codons.
Once a gene has been sequenced it is important to determine the correct open reading frame (ORF). Theoretically, the DNA sequence can be read in six reading frames in organisms with double-stranded DNA; three in the forward and three in the reverse direction. The longest sequence without a stop codon usually determines the open reading frame. That is the case with prokaryotes. Eukaryotic mRNA is typically monocistronic and therefore only contains a single ORF. A problem arises when working with eukaryotic pre-mRNA: long parts of the DNA within an ORF are not translated (introns). When the aim is to find eukaryotic open reading frames it is necessary to have a look at the spliced messenger RNA mRNA.
Reference: Open Reading Frame