Fungus develops in your hair when fungi are transmitted onto your scalp. You can find fungi in most environments, so be aware that it is often contagious and can spread to your skin.