Hamlet is telling Horatio that it is not his time to die.
Hamlet has been through a lot by this point. His father died, and then appeared to him as a ghost and demanded that he get revenge on his uncle, Claudius. Hamlet angered his uncle by concocting the scheme with the play and got himself sent away, where he was supposed to be killed, but he escaped and turned the tables on his would be assassins.
Now, he is supposed to fight a duel with Laertes, whose father he killed (one could argue he is responsible for his sister Ophelia’s death too). Horatio tries to talk him out of it, telling him to say he’s sick, but Hamlet explains that what will happen will happen.
We defy augury. There’s a special
providence in the fall of a
sparrow. If it be now,
’tis not to
come. If it be not to come, it
will be now. (Act 5, Scene 2)
Hamlet is basically saying that he is not listening to any fears that he might die (that’s the reference to augury, which basically means prediction), and he is going to the fight. If he is going to die now, he is ready to die now. He makes an allusion to the “special providence in the fall of a sparrow” as if he expects divine intervention. However, he goes on to say that “the readiness is all” meaning that he is ready to fight, and he will fight.
Hamlet does say “if it be not now,/yet it will come.” He knows that he might die, and he is ready for that too. He is confident, but he is a man on a mission. He believes that he must do this, because he has made an oath to his father (actually his father’s ghost) and to himself, to see this through.
Although Hamlet says he defies the predictions, he really is about to die. His uncle has betrayed him with this duel. He cannot but see this coming. When he is talking to Horatio here, he is not afraid to die. He has already confronted his demons when he asked himself what happens when "we have shuffled off this mortal coil" (Act 3, Scene 1). Hamlet is prepared to die, but he will take Claudius with him.