1. Get the music.
'Nuff said. It's also best to ask more than one person for the tunes as well, in case some people are slow, because some people can be busy with their own things, and can be slow.
2. Know the names of the songs.
This won't be that hard if it's a top 40 or other cover gig since you may have heard these things on the radio or even played them previously. But if it's an original band, it's another story. To know the names of the tunes, you have to listen to them a few times. Know the hooks, know the lyrics and how they cue things, your ear will learn to anticipate these things when you're in the moment. I had a gig subbing for a group years ago where I skipped this step. I knew every little part in every tune, but wasn't entirely sure of the song names. The singer turned and called out a tune and before I could ask "Which one is that?", they went into it. I missed the entire guitar intro that was integral to the song, which really sucked because I knew it. Know the songs like a fan would know them, because it will make every other step a whole lot easier.
3. Know the changes.
Even if you are responsible for lead duties that don't require strumming through the whole tune, sit down with the songs at home and do it anyway. Once the changes are internalized it kind of creates a map in your fingers and ears that will allow you navigate the changes as a lead player and be aware of where you are in the structure of the songs. Some three chords tunes can have a lot of little nuances that are triggered by the rhythm section alone, it's best to be a part of it for a while before getting down to the finer points, because the finer points are just looking at the large parts through a microscope.
4. What's the stage dress code?
Now that you have the minimum requirements to share the stage with a band, you better look like you're part of the band. A Tapout shirt and board shorts with a Country band=stupid. Pretty obvious right? Ask if there is a colour code on stage. All black? Jeans? What kind of top? It doesn't hurt to have black dress pants, a black and a white button up shirt, a blazer and a tie in the closet. They can be useful for corporate events, weddings and job interviews.
5. Learn the ins and outs.
With a paper and pencil, write down what happens at the intro and ending of every single song. Note things like which instrument takes it in, what chord it starts on, vocal cues, which beat it ends on, which chord. Now play along with just the intro and ending of every song until you've got them down. Knowing ins and outs and changes alone will pretty much guarantee you'll get the job done well.
6. Know the little parts.
This requires an intimate knowledge of the songs, but since you know the names of the tunes and the changes you've heard the subtle intricacies underlying the songs. Get out some manuscript, or TAB paper or just focus your attention and write down/memorize the fills, shots, pauses, ritards, dynamics, harmonies etc. These finer points will guarantee you'll get the job done well, and another call to fill in should the need arise some time in the future.
7. Don't be a dick.
Here's some advice from active players on the scene.
"Playing at the appropriate volume level and bringing the right gear to the gig is crucial, i.e. getting the right sound or sounds. It can be useful to actually check the band out with the regular guitarist if possible. I've thrown little cheat sheets together when I've had to learn a bunch of material on short notice...not actual charts but a tune list with keys and anything else I'm likely to forget. I leave it on a stand, on my amp, on the floor, somewhere not too obvious. They've come in really handy."
"Show up early to the gig, not at the last second. I won't bring anyone back if they cause me any grief, especially wondering if they will show up on time for the downbeat."
"The subber should consider who they are subbing for. There are gigs which I have subbed in for people who have really brought an identity to the gig and although the stuff they play live may not be on the record, it's still massively important for others in the band who take cues off those "parts". Ultimately, it's their gig for the reason that the band or artist deems them the best person for the job. I've had situations where an MD has told me "yeah it's not on the record but our regular guy always does this". In that case getting in touch with the person you are subbing for and chatting with them can be really helpful for the subber and put other peoples minds at ease.
There have been situations in the past where folk have subbed for me, not been in contact and ultimately blown the gig that I've worked hard to keep at a high standard. This reflects poorly on everyone.
I think this is something that tends to be overlooked because people get all caught up in "getting the call" and in turn thinking it's all of a sudden their chance to do "them" to the fullest. There are many obvious reasons why that's not the case. Obviously theses differences are more severe in established artist gigs compared to a random pub gig but I believe this stuff should still be acknowledged unless you're Slash and you only get called to be Slash."