A dilemma that is confronting right now is knowledge versus research. I am a second year physics undergrad, with a strong interest in mathematical physics, QFT, and an even more strong interest in pure mathematics. Right now, I am not sure what to pursue, hence ideally I would like to try out a lot of both the fields. However, most of the people I meet are advising against me saying I should just pick and area and stick to it, and try to publish papers, even if I want a remote chance of getting into the top grad programs in the US. So , I am confused if I should stick to a field, and get research papers published or explore a large number of areas. This boils down to the question how much importance does a uni give to a research publication over the knowledge the person has?
The main thing that graduate school admissions committees are looking for are good researchers. Publishing papers demonstrates such ability; publishing papers in well-known journals is even better. However, it's difficult, as an undergraduate, to publish papers as first author (which is the most important position when one is applying as a student). Typically, they will be working in consultation with a more experienced student, who will be the lead author. In that case, while the credits are of themselves useful, they need to be coupled to strong letters of recommendation from the co-authors, testifying to the student's original efforts in executing the work.
At the same time, one should not totally sacrifice depth in a single area for breadth; grad schools want to see some evidence of concentration, but complete devotion to one area is also too much of an extreme. Try to balance the two somewhat, so that you've explored a few areas, and worked at least one or two areas in depth.
To add to other answers... thinking of mathematics: It is difficult to somehow-deliberately acquire intellectual maturity. Attempting to "force it" or "fake it" will produce outcomes worse than doing nothing. A more honest and productive attitude is "engagement", which may or may not produce papers. Even a very capable novice should not focus on "papers" because this has a corruptive effect on the clarity of one's thinking, and tends to create possibilities to look silly, if not worse.
Awareness of current events, engagement with them, are the most important. No, the GRE Math Subject Test is essentially completely disconnected from this, but does test for a certain facile cleverness and quickness. Grades and standard coursework are relevant only to the extent that they prepare one for more serious, live things. Getting a perfect score on a drivers license exam does not mean much about one's capacity to drive in Formula One races, or NASCAR, either.
As an advisor and mentor to quite a few PhD students over the years, I've found that the worst liability is believing too firmly that one has already "arrived". True, it can be debilitating to doubt oneself too much, but that is closer to sense than believing that no one knows anything, so that one's trivial observations represent publishable progress that should "impress" people. If anything, one should manage to communicate that one is aware that other people have done many things.
Probably the most essential element in applications is letters of recommendation from experienced research people who know you well, who (hopefully) can attest your potential. Being "best in a class" is good, is nice, no downside, but is somewhat tangential to "research potential". Writing childish papers as an undergrad does not certify anything at all about one's potential for serious professional work, and one should be careful about misunderstanding this!
Admission to an elite grad program in math (in the U.S.) is difficult without excellent GRE score (=filter), maybe a good Putnam score to show you're clever, undergrad degree from a "Research I" school with many graduate courses on one's transcript (since undergrad courses at best don't quite get anyone up to the starting line of awareness or knowledge), and glittering letters from people who are established research people, who've made a contribution themselves. (Otherwise how in the world would they know what they're talking about when they say you have the potential to do serious things?)
Having said all that... I guess an indirect point is that one ought not expect to have any meaningful publications. Sure, one can probably arrange meaningless publications, but, if anything, real mathematicians are not moved by that. (Such things are handy for impressing university-wide panels on this-and-that, but that's a different story.) So far as my (limited, but not exclusively anecdotal) experience indicates, a tiny minority of applicants to the best grad programs in math have any real publications at all.
Ideally, research publications give a strong indication of not just how much knowledge a person has acquired, but how much has he been able to contribute to the existing body of knowledge. That, coupled with the fact that there aren't very reliable metrics to gauge a person's knowledge (grades are a very poor metric in that regard IMO), makes it obvious that you would be best served by focusing on churning out as many high-quality papers as you can!
You should try to think just like a professor. Just think that you are allowed to have some students to work under your supervision. So, do you prefer to have a student who is able to conduct research and publish paper or some one who does not know how to do research but have good grades? Graduate school is all about doing research and showing that you are able to do that will surely help you to get accepted by grad schools. They want to know if you are able to cope with such life as a scientist or not. It is possible if you devote yourself to research your grades become low, but it is normal and no one is able to publish great papers and at the same time obtains good grades. All in all, publishing papers surely helps you. A little advice, make a team with your friends and divide the works to be able to make a balance between both sides.