Sirius Black's break in of Hogwarts Castle happened on Hallowe'en 1993 while the students were at the Halloween Feast. It was Sirius Black's first attempt to enter Gryffindor Tower and kill Peter Pettigrew, then hiding out as Ron Weasley's pet rat Scabbers, in revenge for the betrayal of James and Lily Potter. It was foiled by the Fat Lady, who refused to allow Sirius entrance without the password, and he stabbed her portrait before fleeing.
After Severus Snape tipped him off to the fact Lord Voldemort had marked them for death, Albus Dumbledore advised the Potters to go into hiding using the Fidelius Charm, a concealment charm so strong that the only way to break it is for the Secret Keeper, the person to whom the spell is bound, to reveal it to the person by whom the witch or wizard does not want to be found.
Dumbledore offered to be the Potters' Secret Keeper due to suspecting, correctly, that one of their friends had betrayed the Order of the Phoenix and joined the Death Eaters as a spy. James Potter, however, insisted on using Sirius Black due to their brotherly bond. Unbeknownst to all except the Potters, Sirius convinced James to make Peter Pettigrew, one of their friends, his family's Secret Keeper instead. He also convinced James to tell no one of the switch because, like Dumbledore, he also feared one of their friends was a traitor and was convinced it was Remus Lupin, another of their friends, because of his werwolfism.
Making Pettigrew the Secret Keeper proved to be poor judgement on Black's part: Pettigrew was the traitor who joined the Death Eaters, under his Maurauder name Wormtail, as a spy. One week after becoming the Potters' Secret Keeper, Wormtail went to his master and told Voldemort they were in Godric's Hollow, where the Dark Lord met his downfall in Harry Potter. Pettigrew also sent Sirius to Azkaban by framing him for betraying James and Lily, leading them to their deaths, and the murder of the twelve Muggles whom Wormtail murdered by blowing up the street with an unknown curse and faking his own death by Sirius's hands.
Twelve years later, Black read an article about the Weasley family in the news and recognised Scabbers as Wormtail in his Animagus form and escaped from Azkaban using his own Animagus form to hunt him down at Hogwarts.
Using his Animagus form, Sirius was able to enter the castle undetected. He made his way unseen all the way up to the entrance of Gryffindor Tower and changed back to his true form. However, The Fat Lady would not let him in without the password. Frustrated, Black slashed her portrait and fled. When the Gryffindors got back, they saw the damage and Peeves revealed Black to be the attacker.
The staff at Hogwarts searched the castle but Black evaded capture. The Fat Lady refused to return to work until Black was caught, forcing Dumbledore to find a substitute. Because all of the other pictures were too scared to want the job, he was forced to give the job to Sir Cadagon The Mad Knight, about which nobody was happy. Cadagon held this position until Black's second break in, after which a furious Professor McGonagall fired him for letting Black into Gryffindor Tower. Because everyone thought Black broke out of Azkaban to murder him, Harry Potter, to his annoyance, was instantly placed under surveillance: the teachers found excuses to go down the halls with him, Percy Weasley tailed him everywhere like a guard dog, and Professor McGonagall placed the Gryffindor Quidditch team under Madam Hooch's watchful eye.