Say if I had one day to learn a medium difficulty song and I haven't even looked at it. What is the most effective way of learning the song the best I can in, let's say 4 hours? No rehearsal, just playing the song live the next day. This question is mostly for playing in a band where they have the general idea of the song but it is focusing on me or the player and i want to keep this question general
Hah. This may benefit from some context (Genre? Situation? Are you the soloist?).
Assuming you'll be playing an instrument in an amplified rock/pop combo:
Metronome metronome metronome. Practice separate hands, practice each section separately, each bar at all sorts of crazy tempos. Slow, medium, insanely fast. You never know how caffeinated the drummer will be tomorrow.
Bonus: start learning/practicing the piece from the end.
If the genre allows it, don't be afraid to simplify parts, "fake" or rearrange. In particular, first "fake" it, then go deeper. It's better to play decently a simplified and/or half-improvised version than screwing up majestically while trying to pull off an insane widdly-widdly solo. If you are transcribing, don't be too anal.
Annotate your sheet with cues from other instruments and from the lyrics. Getting lost is one of your worst enemies. "Oh, that's the third verse, where the guitar does that run, right" can help you a lot.
The band will change the structure. Those bastards will have 8 extra bars for the solo and they won't even know they have added them themselves because hey, they've been playing like that from the start. Be prepared for that.
Be wary of of playing along with a CD. It can give you a false sense of security. Also, the band you'll be playing with may or may not sound like the CD.
Practice with cotton in your ears and a diesel engine running next to you. With any luck, it will still suck less than the on stage monitors. The monitor engineer will be no good.
Do whatever it takes to keep cool. Be relaxed. Look relaxed.
If all else fails, just lower the volume of your instrument to the minimum and nod along, then blame it on the FOH engineer. "Hey, I could hear myself just fine, a shame you folks in the audience couldn't hear me."
I'd probably use a metronome and start slow and speed it up when I feel comfortable. This question might not have one best answer because each person probably has different areas of most difficulty. For me it's timing, hence the metronome. Playing along with a recording of the piece is also a good quick learn trick, if a recording is available.