Research and writing are the primary substantive tasks. Some of the work is very close to what you do in Legal Writing class. You may also get to watch an attorney go to court, take a deposition, or close a deal, but those opportunities depend on what just happens to be going on and whether the attorneys know you really want to do that.
Big firms often have a lot of summer associates and do an elaborate "summer associate program." Summer associates in those programs do research and writing, but they also spend a lot of time socializing (and drinking) with the attorneys and going to various presentations about the firm. There are usually formal assignment and feedback systems.
Smaller firms might have just one or two summer associates with no structured program. The assignments may be similar, but the amount of work could be much greater or much less than in a "summer associate program," and there are few if any social events or training sessions involved.
1L and 2L SA's do the same thing--2Ls can just handle more complex issues and more areas of law.