As noted in the comments above, the order of things is somewhat dependent on the size of the boat, the number of crew, crew experience, and the size of the leak. If the boat's been holed your first priority is to get something to plug the hole. Whoever's doing that will be shouting their head off to get attention for help. The skipper will then be able to assess the situation. Is it all hands on deck to stop the leak and bail, or is it get someone on the manual pump(s), someone on the radio to send for help, and assist whoever found the leak in their efforts? I normally sail with just my wife, occasionally a friend or two. My boat has both automatic & manual pumps (it only had manual when we bought it, I added the automatic pump). Assuming I've got battery power (or my engine's running), the automatic pumps will remove 2000 GPH which sounds like a lot, but we've only got a 25' boat and even 1" hole would sink us while the pumps were running as fast as they can. Therefore plugging the hole is the fastest way to prevent a sinking. Once the hole's plugged, you can bail/pump in relative safety. The larger your boat, the larger volume of water that must get inside to sink it, smaller boats counter-intuitively need larger pumps because of this. Volume increases with the cube of length.
The USN destroyer I was on had a leak in the after engine room that nearly sunk us at the pier. We went to general quarters at about 7am on a Saturday at the pier. The ships on either side of us also went to GQ to assist. There must have been 20 or so of us in the engine room plus the rest of the ship helping to dewater the space. The machinist mates in the engine room couldn't find the leak (and we never did find the source), they simply closed every single valve in the lower level of the engine room sometimes by swimming to get to them. By that time the water was waist deep over the deck plates which meant it'd come up well over 6' and you could see the ship was sitting low in the water. We fought that leak for a couple of hours, but we only able to do so because we had an entire ship's company plus two more to do so, and the engine room had the volume to contain the water. On a boat the size of my sailboat, we'd have sunk in 5 minutes and been swimming.
So, plug the leak while screaming at the top of your voice for attention. Get everyone into life vests if they're not already (my wife & I always wear our self-inflating vests, but guests may not have one on). Once the leak is under control or sooner if you have the crew, make sure your automatic pump's running and put crew on the manual pump(s) if you have them (my first "big" sailboat didn't have any pumps at all). Then if you still have crew put someone on the radio calling for help (we have a "Suddenly in command" card from Davis that gives them instructions). Anyone else who's left should be bailing. On my boat it'd be very difficult to get more than one person in place to bail, possibly two if they weren't very big people.
I keep a couple of wax toilet rings in my bailout kit that will easily plug up to about a 2" hole along with tapered plugs to drive into a hole to stop or slow down the leak. I have a couple of easily reached 5 gallon buckets and one collapsible one. I have three VHF radios onboard (two handheld, one that floats, and the main VHF with an antenna up the mast) so it's easy for someone to be using the radio while out of the way of someone else bailing or whatever in the main cabin. The main VHF is attached to my GPS and has DSC so you can just push a button to send a MayDay call (that radio also has a WHAM microphone so you can use the radio remotely and it can also send the MayDay call). You'd be surprised the amount of water a frightened person can move with a bucket.