I assume by default that you're applying for a PhD program in computer science; if either of these is not true, please remind me of it (repeatedly, if necessary!).
To write a letter for you, I need a month. This is because (a) I have many demands on my time, and (b) I let these letters gestate for a long time, revising draft prose in my head. The longer I get, the better the letter. More to the point, if you give me less than a month (i.e., your earliest deadline is less than a month away), I will probably decline to write a letter for you.
To write your letter, I need:
What you should not send: forms, envelopes, etc. After checking in with me (so I can provide a heads-up), send these directly to my assistant. Be just as respectful of my assistant's time: don't make them do things in the last minute. If you rush them, they may do a sloppy job or not do it on time at all, and they (not you) will have my sympathy and support. You had to give me at least a month's notice, so why not them, too?
Of course, these days applications are mostly electronic. What I do is send the letter to my assistant and have them do all the uploading. Therefore, you should use their email address, not mine (but my name, not theirs) on the site where you list your letter-writers. Please check in with the assistant on when they want you to list them, because the moment you do, most of these systems will generate letter requests. That means they'll suddenly be flooded with these requests, but can't dispatch them right away because my letter isn't yet ready—so they're stuck having to keep track of all these. You should take this precaution not only to be considerate to them, but also to help yourself: if they miss one of those mails, my letter won't be submitted, and you will probably be rejected in silent failure mode.