Whether an allele is dominant or recessive depends on the exact biochemical mechanisms at work. Many times a "broken" version of a gene is recessive. For example, cystic fibrosis is caused by a mutation in an ion channel called the
cystic fibrosis transmembrane conductance regulator (CFTR) that prevents the ion channel for working properly. The disease allele is recessive because one functioning allele is sufficient to make enough CFTR for the body to behave normally. Only when both copies of the gene are non-functional does the disease occur.
Some "broken" version of genes, however, will inactivate the functioning copies of the genes and thus behave as dominant alleles (these are referred to as
dominant negative alleles as they are dominant alleles that cause a loss of function). This is especially common when the proteins encoded by the genes function in a complex and one broken subunit in the complex is enough to render the entire complex non-functional. Another way for an allele to be dominant is though a gain-of-function mutation, in which the allele confers its trait by performing some new function (for example, an enzyme that cannot be turned off properly). A good example is
lactase persistence. Normally, humans turn off production of the enzyme required to digest lactose in milk after childhood. Mutations can "break" the body's ability to turn off the gene, leading to production of the enzymes into adulthood. Even if only one copy does not get turned off into adulthood, this is sufficient to allow lactose digestion into adulthood.
I am not so familiar with the mechanisms behind widow's peak, so I don't know specifically what is happening in that case.
Here's a particularly good explanation of the topic with more examples:
https://genetics.thetech.org/ask-a-geneticist/genotype-vs-phenotype