The second, and most important, step in preparation is to make sure you can read the writing. There is no way to ensure this except to try it. There are books on the paleography (study of handwriting) from different eras and locations. There are books with documents reproduced and also transcribed. The brain is amazingly able to adapt to making sense of what at first looks like completely unreadable scribbling, but it is a lot harder and takes longer if you don't have a template to work off of. A book that explains the writing or that gives examples with transcriptions will dramatically cut down on the wasted time in the archive. But note also, that it takes time to learn to read old scripts, and even more time if they are in foreign languages. My experience has been that I can practice and practice and make very little progress. But if I stop for a week and go back to the practice documents, somehow the writing has sunk in, and I am able to process it better. So well before you head to the archive, find some examples of the writing you will be looking at, and, if necessary, give yourself plenty of time to learn to read it. That said, you can still expect that, when you get the actual document in the archive for the first time, you will feel like crying. Stare at it as long as you can. Then go away for a couple days, and things will be better when you come back to it.
In another post I will deal with the case where it is just not possible to learn the writing in advance, or where you arrive and find that what you are looking at is different from what you expected. The short answer for now is: invest in a good digital camera.
Third, do as much reading in the secondary literature as possible, as the more you understand about the context of the documents and their content, the easier it will be to work with them. You will know what you are looking at and looking for, so you will waste less time. You will also know when you have made a great discovery and when you are trying to reinvent the wheel.
Also, don't forget the historical sciences of diplomatic and codicology. Diplomatic is the study of documents: their structure, content, and use. Codicology is the study of the book and its structure. In that archive in Lyon, for instance, it helped a lot to figure out what I was looking at to know that in bankruptcy dossiers I could expect to find inventories of the estate and depositions of involved parties. Similarly, if you know that all documents of a certain kind have particular stereotyped clauses, not only will you not take these clauses too seriously (as evidence) but you will also know in advance what words those squiggles on the page are supposed to represent, and that can help you decipher the rest of the text. Similarly, if you will be working with books or manuscripts and you know a bit of codicology, you can often divine useful information. I benefited just recently in my paper on William de Grey from knowing something about how books were put together because I could work backward to figure out how he took his book apart and reordered it. It can also be helpful to know something about the sorts of pens used in your era, the sorts of inks, the people in charge of making the documents, how they were filed and stored, etc. All of this information helps to decode what you are looking at when you have the document in hand.
Fourth, it is okay to contact archives with questions. For instance, if I come up with a reference that might be useful but I can't tell from the description, it's a lot easier (if I have a week or two to wait for the answer) to email the archive and ask for a fuller description than to potentially waste a trip. If you really want an answer, however, don't ask for anything that smacks of having the archivist do your research for you. Also, it can be helpful to explain what you are researching. Archives these days are so full of people doing genealogical research that archivists are often rather relieved to get a request that does not have to do with family history research, and they might be more inclined to be helpful.
Finally, if I know some or all of the documents I will be looking at, I make up a detailed list for each archive that includes the shelfmark and full description given in the catalogue. Sometimes it is hard to relocate the document you want when you get to the archive and are using its catalogue; sometimes the shelfmark you found in an old work of scholarship is out of date and having as much description as possible can help the archivist or librarian locate what you are looking for. If you found the reference in a published work, note the work. Basically, have handy everything you know about the document because archives can sometimes be remarkably disorganized, and the more information you have, the better. I take a printed copy of the list with me, and as I look at each document, in addition to my other notes, I also make quick notes on my master list, e.g., "not useful," "wrote extensive notes," "took picture." This is sort of my back up. Otherwise, I might have looked at a document, found it unhelpful, not taken any notes, and then later I go back and, since it is listed on my master list, I can't figure out why I don't have any notes about it. My general rule of thumb is that it is not possible to take too many notes when doing archival research, but more about that later.
Last point, some archives now permit you to order documents in advance. Often their website says you can do it, but they have no mechanism for ordering. In that case, send an email to the general address they list. Give them a full description of the document(s), the date, and time you intend to come (and be super polite, as that will get you the best response). Best to give three or more days' warning, though some archives will turn around orders in less time. Usually archives only permit readers to call up a limited number of documents at any one time. You are generally safe pre-ordering three or four, however. The value to this is that you can get to work as soon as you arrive, and while you work on the documents you pre-ordered, the archivists will be bringing up the next batch that you order when you get there. In addition, some archives require you to make a reservation in advance, so don't assume--especially with small archives and libraries--that you can just show up during opening hours and get what you want. Always check in advance.