An open reading frame or ORF is any sequence of DNA or RNA that can be translated into a protein. 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.
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 and the ORF will be long and continue over gaps, or 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). Sequenced DNA can be read in six reading frames, three in the forward and three in the reverse direction. The longest sequence without any stop codon usually determines the open reading frame. That is the case with prokaryotes. A problem arises when working with eukaryotic DNA because 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 mRNA.