I know ringworm is caused by a fungus on the skin, nails or scalp but what causes the rash to form as a ring instead of like a normal spread out rash?
Ringworm is caused by a several species of Trichophyton fungi (T. rubrum, T. tonsurans, T. interdigitale, and/or T. mentagrophytes); and a couple others are well known (Microsporum canis, and Epidermophyton floccosum).
The ring pattern is not unique to ringworm causing fungi. (Fairy) Rings are totally common with fungi because mycelium grows outward from the center; and as the mycelium grows, the inner mycelium often dies (from starvation, age, attack by immune system?, or it is cannibalized) leaving only the outer ring of mycelium, which may continue expanding.
Unfortunately the medical world doesn't spend much time on the problems that they can already solve (like with an antifungal ointment or pill), so there hasn't been much effort devoted (to my knowledge) toward answering the mechanistic questions of ring formation of dermatophytic fungi. But it is known that some Trichophyton species sexually reproduce and Trichophyton rubrum also probably does reproduce sexually (ie., plasmogamy, karyogamy, and gametangia). I don't have any grounds for mentioning it (besides logic), but sexual reproduction is probably "age" related in fungi as is growth- so, a ring may be more pronounced in an area where fungal hyphae conjugate... much like the expression of fruiting bodies of other mushrooms.