Martin's answer offers a great overview and a link to a hidden gem - transcribed interview with Michael Foale, covering the incident and its aftermath in a great detail. I'd like to share the most interesting bits here as an answer for reference. The whole transcript is a very very interesting and chilling reading, what follows are some terse excerpts (so that the answer isn't way too long). Emphasis is mine.
The collision demarcates everything for my flight, not because of the terribleness of the collision; because it changed the whole condition of the station and the environment in which we worked.
...
Then it occurred to me, "Well, you know, you'll get to see your kids and Rhonda sooner." And Ithought, "Oh, but we're going to be landing in Kazakhstan. That's going to be a delay." (laughter) The thoughts that went through my mind, it was exactly like that. I thought, "You'd better focus on getting this sealed off here." (laughter) That's what went through my mind. Then we started pulling the cables, and I got serious, pulling the cables with Sasha. There was a cable or two that burned in spots, so we had to find a way of disconnecting that one. Sure enough, we thought the way was clear from Spektr, we then tried to position this big, big hatch into it. You should remember that a node is built with six holes. It's like a dice with six faces. Each hole has a hatch. Well, since the hatches are bigger than the holes, they had to put the hatches inside the node before they built the node, and those hatches don't come out there. These hatches have been there ever since they created and built the node --six hatches
--and they're somewhere. The thing is, you have to get them out of the way in Space
Station life, so they've been tied up, and they've been tied up pretty securely. The biggest hatch, the one that we wanted to put in there with a valve and all the rest, air equalizers between it, was really tied up pretty severely. I mean, we wasted about a
minute trying to untie that hatch. And the pressure's falling, pressure's falling, so it's getting pretty frantic.So we wasted some time on this one big hatch, and it was then as we moved --we gave up on that, basically. It was too tied off. We found a smaller hatch. They have two types, thin ones and fat ones. We found a thin one, and that was pretty easy to untie. Sasha gave it to me to put in place, popped it in place,
and he says, "Mike, hold it while I go and find the key to crank the latches that hold it closed." In fact, the key was present in all this space, but with all the wires, cables, and hatches, the key was not really easy to see, and we didn't see it. So he went off to another part of the station to go and get a key, a hatch lock. I held it.
Well, as the hatch pulled in because of the pressure difference.
...
But the Mir, having been hit by the Progress, set into a bit of a spin, and as a result, because the solar arrays weren't getting any energy and as a result of all the activities to isolate the leak, we hadn't turned off anything. We had used up all of the reserve energy in the batteries, and the batteries went flat pretty fast, and we went into a very severe power-down, so severe that in the night pass there was nothing alive. As we were on the dark side of the orbit, there was nothing on. This lasted for about thirty hours, I think. Yes, a day and a half, where when we came into sunlight occasionally would we get enough power on to a solar array that happened to be catching the sunlight at that moment, because we were still spinning, would we have enough power to talk to the ground and then try and recover.
So that was a pretty hard time, because we got very tired. And that was the hardest time I ever had on the station, was that period, because we just got so tired. Of course, the commander's morale was pretty --he was just shot, stunned.
...
...as you probably know, most NASA long-duration flights haven't been allowed to operate the systems much. They weren't relied on to do that, for a number of reasons, to do with contracts and bonus payments to cosmonauts, and whether or not you would [unclear].
...
But in the subsequent orbit after the collision, we were spinning at about one degree a second, and the call came up on the ground, and [...] I was on the com, the call came up, "Guys, what's the spin rate? We don't know. We've got to know how fast it's spinning." And Sasha, see, at that point, worked very fast, for whatever reason. Sasha knows how to do this. ... I look at the stars' wobble. So for whatever reason, I more quickly got to the window, put my thumb against the window, looked at the stars, and was able to tell the ground what the spin rate was. I called it down. ... They had no other choice but to accept my word for it... So they said, "Okay," and they then took that information and fired the engines in a blind mode to stop the spin. And it worked. They said, "Did it work?" I then looked out the window again, looked to the stars, and said, "Yes, it worked." And so they said, "Good. Well, you know, we think you're going to have to spin the station with the Soyuz." And then we went out of contact with the ground. At that point we then lost all power. So now Vasily and Sasha --no one's been trained how to spin the station. At this point I then had some definite ideas. ... I am a physicist and I understand rotation dynamics of irregular bodies like the Mir. I said, "You know we need to use the Soyuz to fire the engines in a translation mode, not in a rotation mode, ...
...
So I spent a lot of time, and we had a lot of time to talk. There was nothing to do. There was no sound. There were no fans. At that point we were very afraid the carbon dioxide building up around us would poison us, so we were keen to be with each other, keep waving paper like this, to keep the air moving around us, to keep the CO2 from puddling around us. It was in that time frame that we discussed how to reorient the station initially with the Soyuz and then put a spin on it. At that time after the collision, I had no clue, really, about the moments of inertia at the station, and that specifically is those properties that determine how the station either spins like that or like that or like that. ... I didn't know which axis would be different from which. That's not something anyone in the cosmo corps is taught. They just don't know it. In fact, I'm not totally sure the ground knows it. They could sort of calculate it and think about it, but based on where you've put payloads and food boxes in the Mir, it changes what I call these moments of inertia properties in the station.
...
So we worked out a scheme whereby in the Soyuz Vasily would fire a thruster or a jet and try and see what effect it had on the station. It was horribly complicated because the Soyuz control axes were controlled by 45 degrees to the station axes, so we had a very, very confusing technical dialogue with Vasily as to what the orientation --and Sasha and I were both confused for at least an hour as to quite how the axes of the Soyuz lined up with the rest of the station. We had no clear picture. There was no picture in our flight files. The model wasn't correct. As you fly through the base block into the Soyuz, the node, because of the hatches, you have to do a twist around the hatches, and that twist totally throws off your orientation. You can't just move in an orientation from the Soyuz to the base block and maintain what was in the Soyuz in the base block. So we had a running argument as to what that orientation difference was. We knew it was 45 degrees out; we didn't know which way.
...
Vasily had already turned on the Soyuz, so that was possible. That's a subtle point that probably is going to go over your head. But it turns out you can't disconnect the Soyuz from the station power bus and turn the Soyuz on if you don't already have power on the station. And for whatever reason, I think Vasily had already disconnected the Soyuz from the station while we still had power on the station, so we were able to use the Soyuz. There was a subsequent event many weeks later, when Sasha disconnected the cable packs, that put us in a huge power-down mode, and then when we wanted to use the Soyuz, we were already powered down, had no power, and we couldn't disconnect the Soyuz. We couldn't even turn the Soyuz on. Then we just had to wait until sunlight somehow entered the station arrays.
Edit 2021-05-14: Link to PDF went dead on NASA's web, I changed it to a link to Archove.org. Thanks to Peter M. for pointing it out.