Hidan is one of the biggest "What the hell"'s in the series.
The square, circle, and triangle he uses to evoke his ... ability ... are derived from ancient Shinto and Chinese symbolism for the Earth (square), Sun/Sky (Circle) and Stars/Moon (Triangle). His ability is not really explained in terms of chakra or jutsu - it is a sort of ritual religion that evokes the power of a god, Jashin, to make Hidan immortal (quite literally, as far as we can see - damage simply has no effect on him and can be reflected back on the target of someone whose blood the scythe has come into contact with).
Seeing as Kaguya is a goddess-ish type of entity, and Jashin quite clearly has demonstrated that the ritual, at least, works... it would stand to reason that these two entities would potentially exist in conflict with each other (Kaguya and Jashin), however, this is never explored - and Jashinism is just completely ignored from that point forward.
...