First of all, the obvious causes include physical trauma, a hay poke up the nostril, etc. The nose has a lot of veins and this is a possible cause and a fairly harmless one.
One of my past pigs, Linney, developed recurrent, extensive nosebleeds in her old age (starting as she got close to six or so in age.) The first time she was actually with my mom as I was on vacation, and my mom thought she had somehow banged or poked herself. About a week later, she had another extensive nosebleed- sneezing blood everywhere, blowing bubbles out her nose to try to clear it so she could breathe easier, etc. We saw our vet, who did his best to look but really couldn't see much up through her tiny nostril. His opinion was that it could be a lot of causes, from something benign (a lesion or polyp that kept bleeding, etc.) to something more serious (like a malignant cancerous tumor up there.) He offered us an x-ray, but she would have to be sedated and there was no guarantee that soft tissue masses would show on x-ray. Because we would not have sought aggressive treatment if it was cancer (both because of her age and the fact that it was really costly and would have required extensive travel), we opted to monitor her for quality of life and to leave her be as long as she was happy, eating, and behaving normally. Ultimately, she had on-and-off nosebleeds for the next six months or so (usually in spurts- she would have one a week for three weeks, then nothing for three months, then several again in a row.) She passed away at about 6.5 years of age, about 7 months or so after the first nosebleed. I have no way of knowing whether her cause of death was in any way related to the nosebleed issue or not, or if she was simply elderly and it was unrelated. I did wonder retroactively if she had some version of leukemia or lymphoma or blood-related cancer that reduced her clotting ability and I think if I was faced with the same situation I would ask if there was blood work to rule that out. However, I'm not sure that it would have changed the course of treatment at all finding out for sure.
I guess my advice at the end of that story is to see a vet to get possible ideas, especially if the nosebleed recurs. Pay attention to her breathing, since there is a risk of her inhaling blood and you don't want her to develop a pneumonia. Be prepared, though, that the vet may have a hard time nailing down a cause for you. All the research I did when Linney had this issue led me to the impression that, although not unheard of, it's not that common a problem either (or at least I had a hard time finding information when searching and my vet, who is an exotics/small animal specialist, had limited experience.)