I assume the horns and frill of cerotospians( in this case, Tricerotops and most chasmosaurines)was used primarly for intimadation rather than a defense. But i wonder - how would a Tricerotops take to action when a tyrannosaur attemopted to prey on it? Wouldn't a young tyrannosaur be able to take a bite (as a result of Trial and Error and curiosity, ofcaurse) and learn that the frill is ironacly quite weak and take advantage? It seems that Tricerotops was quite unprotected.

Also, what exactly were the horns made of?

The horns of ceratopsians had bony cores -- those are the parts that fossilise -- with a keratin sheath. In that way, they're much like the claws of birds and other animals. In life, ceratopsian horns would have been somewhat longer, thicker and sharper than the fossils alone suggest.

It's actually not a resolved question what ceratopsians used their horns and frills for. We can be pretty sure that they were multi-purpose structures (as nearly all structures are), and that the emphasis in how they were used was different in different species, just as different antelopes use their horns differently.

But you're right that present palaeontological opinion leans towards the idea that the frills and horns were primarily display structures. That said: there is good evidence that they were also used, at least in Triceratops, for interspecific fighting -- establishing dominance over territory or mating partners. And there's this: if I were a Triceratops and I encountered a tyrannosaur, I would not stop and think to myself "Hang on, my horns and frill are primarily display structures", I would do my best to impale that bad boy before he killed me.