Whether an allele of a gene acts in a dominant or recessive manner depends on the biochemistry of how the allele functions. In general, most loss-of-function alleles act in a recessive manner and most gain-of-function allele act in a dominant manner. Of course, there are many exceptions, such as dominant negative alleles which can interfere with the function of the wild type allele.