The doctrine of papal infallibility was formally accepted at the First Vatican Council in 1870. This is not to say that it did not exist previously to that date: only that 1870 is when it became dogma - a teaching which all Catholics are required to believe. Exercises of infallibility are more difficult to identify when occurring prior to 1870. There have been some official rulings but there is no definitive list.
Since the Council, Popes have tried to be clear about precisely when they are speaking ex cathedra, with reference to the description in the Council text (the Dogmatic Constitution Pastor aeternus). This kind of statement is a Big Deal, because it is declaring something that Catholics must believe. The Pope and the rest of the Church leadership will want it to be widely understood that an infallible statement has been made - in the text of the declaration and by means of accompanying documents and public statements.
John Paul II said in an audience The Holy Spirit Assists the Roman Pontiff (24 March 1993):
The conciliar texts also indicate the conditions for the Roman Pontiff's exercise of the infallible Magisterium. They can be summarized in this way: the Pope must act as "the shepherd and teacher of all Christians," pronouncing on truths regarding "faith and morals," in terms clearly showing his intention to define a certain truth and to require definitive assent of all Christians.
The quoted phrases are from the Dogmatic Constitution: omnium Christianorum Pastoris et Doctoris, and de fide vel moribus. He gave the example of Munificentissimus Deus, in which Pius XII wrote (44-45):
For which reason, after we have poured forth prayers of supplication again and again to God, and have invoked the light of the Spirit of Truth, for the glory of Almighty God who has lavished his special affection upon the Virgin Mary, for the honor of her Son, the immortal King of the Ages and the Victor over sin and death, for the increase of the glory of that same august Mother, and for the joy and exultation of the entire Church; by the authority of our Lord Jesus Christ, of the Blessed Apostles Peter and Paul, and by our own authority, we pronounce, declare, and define it to be a divinely revealed dogma: that the Immaculate Mother of God, the ever Virgin Mary, having completed the course of her earthly life, was assumed body and soul into heavenly glory.
Hence if anyone, which God forbid, should dare willfully to deny or to call into doubt that which we have defined, let him know that he has fallen away completely from the divine and Catholic Faith.
In addition, John Paul noted
The conciliar texts also point out how serious is the Roman Pontiff's responsibility in exercising both his extraordinary and ordinary Magisterium. He thus feels the need, one could say even the duty, to explore the sensus ecclesiae before defining a truth of faith, in the clear awareness that his definition "expounds or defends the teaching of the Catholic faith" ... The Pope (who not only plays a role as head of the college of bishops in the definitions on faith and morals that the latter make, or as the notary of their thoughts, but also a more personal role both in the ordinary Magisterium and in his definitions) carries out his task by applying himself personally and encouraging study on the part of pastors, theologians, experts in different areas of doctrine, experts in pastoral care, spirituality, social life, etc.
This suggests that even when the Pope does speak infallibly, he doesn't do so out of the blue, but after wide consultation. This is another way in which news of an infallible statement could become commonly known, before it is even made.