Having been on both sides of the situation, here are a few reasonable options:
- Tell them what the competing offer is, but nothing about who it's from. If you would prefer to work for the second company, this is a good way to make sure that their offer is "competitive" (i.e., around the same amount). If the second company would've offered you slightly less, this may get you slightly more. On the other hand, if the second company would've offered considerably more, they may scale it back to just a little more. Some people are suggesting "stretching" or "fudging" the number - don't do it. If you want them to leap higher, use one of the other options below.
- Tell them you're not comfortable discussing other offers, but you are interested in their offer (if that is true). Since this sounds like your first big job hunt, this is a conservative track and puts the second company in a position where they know you have options, so they can't afford to lowball you. Don't worry about this seeming rude; it's a perfectly acceptable response if you're not comfortable wading into the ups and downs of stating specific numbers. Remember, the first company made an offer without knowing the second company's offer.
- Tell them you won't tell them the other offer, but you will tell them what an offer would have to be for you to consider it. This allows you to honestly give a number higher than the current offer. This is a good option if you prefer the first company if the offers were equal, but a large offer from the second company would change your mind (but see my closing paragraph). If you do this, you want to make sure you don't sound like you're only in it for the money.
- A way to avoid saying a specific number is to use a salary research site and say, "So-and-so.com says that the salary range for this type of position is $X,000-Y,000, and the other offer came in around the middle" (or high-end, or just "in that range"). This gives them a ballpark idea, but not enough information to just tack on an extra 5% to your current offer. Expect them to immediately take a stab, something like "So around $X,500?" to see if they can get a better idea. If you don't want to get more specific, you can probably say "yeah, more or less" or "somewhere around there" unless they come in pretty low.
No matter what, point out that you'll also be considering benefits package, working environment, type of work you'll be doing. If there are significant things that you like about one company over the other, this is a chance to raise them (e.g., "they're in the city, so I'd be able to use public transportation, but I really liked your work environment"). What you're doing is creating an opportunity for them to address a potential "weakness", so in that example, they'll probably point out a bus route that you didn't know about, or carpooling options, or housing and shopping in walking distance.
And then actually do that once you have the offers (or even before you have an offer): really pay attention to whether you would want to work at one place over the other. Unless you're really hard up for cash, how much you enjoy your job will make a bigger difference than a 5-10% increase in salary. Also, realize that salary negotiations can be misleading. If you negotiate a higher salary than a company would normally offer, they may keep your raises lower than average for a couple years to get you back to what they consider the right salary.
Finally, congratulations. Getting to the point of getting an offer is a lot of work, and can be scary the first time. Having to choose between offers is a good problem to have.