When you are being put up for promotion to associate professor with tenure, your record is subject to intense scrutiny (tenure review). Typically, this happens in your 6th year, but depending on school, department, and your record, you may be put up a year or even two earlier, or even a year or more later due to the tenure clock extension for family reasons. At many universities, early promotions are very rare.
The most important part of your tenure package at research universities is, well, your research: your publications, grants, and awards. (Teaching and service are very important too, and probably more important at SLACs, but that may be another post...)
When I started tenure track, I asked around what type of productivity is expected; I actually expected a number -- someone to say "If you publish at least n papers per year, you will be fine," but that never happened. People would usually say something vague like "We want you to show a strong record of publication, to build a viable research group, to have enough money to support your group..." So I figured I won't get a straight answer, and instead I went on my own and researched recently tenured people in my area at my Uni and peer institutions, and figured out what n should be in my field.
Now, in addtion to the total output per unit time, the composition of your papers is important too. Your research output (papers in journals and/or conferences) is supposed to resemble a food pyramid: lots of fruits, vegetables, and grains (your own group's papers), a fair amount of lean protein (collaborations you have established while on tenure track), fats and sweets only sparingly [papers with old advisor(s)]. Therefore, it is widely expected that the vast majority of your papers will be your own group's papers, with the lead senior author (typicallly listed last in the author list) being you and the lead junior author (typically listed first) being your student or postdoc. Generally, if your intellectual offspring is first author, it's considered *your* paper.
The tricky part are collaborations. Your external letter writers -- people who are supposed to assess your work and ideally know it well but often don't -- will be asked to evaluate your contribution to the field, and that also means evaluating how much you contributed to your collaborative efforts. Sometimes that can be quite hard to do, when people's expertises overlap. Junior faculty are in danger of not being assertive enough on collaborations with senior faculty [here I assume it's not your advisor(s), but one or more of collaborators that you teamed up with while on tenure track], and two things often happen: (a) you have a senior collaborator on some of your papers for what are more-or-less courtesy reasons, they are not contributing tremendously or are peripheral to the paper but won't remove themselves from the author list either, and you are uncomfortable to remove them yourself, (b) the senior collaborator is always last author, warranted or not.
Either way, you run the risk of your good, hard work being associated solely with the most senior or most famous person in the auhtor list; this will certainly happen if they occupy the 'lead senior author' position, but even if they don't (this happened to me), because, owing to their fame, their name is already in people's minds and thus most easily associated with a piece of work. So be procative about removing courtesy coauthors (I know, it's unethical to even put them on unless they contributed significantly, but junior people often feel they owe stuff to senior people so these coauthorships tend to linger). I recommend being open about it: "Dr Famous, you know I am on tenure track, and we have done some nice work together, but as I am sure you know people will be trying to judge my own contribution, so I would like to pursue this line of work where my contribution will be unambiguous and separated from your work."
To avoid having your collaborative work associated with more prominent senior collaborators, make sure people know what YOU are have contributed. Talk to whomever wants to listen about the great work that you are doing, and insist on being credited explicitly in the talks given by your senior collaborators - usually people will do it on their own, but you never know. Also, traveling on tenure track to give talks is very important, so people can get to know you. If you start having children while on tenure track, you may have to cut back temporarily, but try to at least do the Tenure Tour -- usually a 5th year tour where you try to go and visit most of the places where letter writers for your tenure case are likely to be chosen from. (You may need to 'invite' yourself to a couple of places, but more on that some other time...)
Another related thing that must be done is weaning yourself from your former advisor(s). I was told that it is OK to wrap up papers you still have unfinished from your previous position, but that this should not continue past a year or two on tenure track. I had a talk very early on with my former advisor, in which I said I was expected to cut him off and he said no problem, and we agreed on which paper would be our last together.
When the time comes to write your research statement (a typical part of tenure package), make sure you can say succinctly what it is that you (and your group) did as part of every collaboration.
Collaborations are a means of creating some -- if not all!-- of the best science around, they can be lots of fun, and truly inspirational (more in another post). To the university, collaborative papers show that you can play well with other kids. Just make sure the other kids don't get the credit that's rightfully yours.