Look, the people that rub it in your face are *******s. However, there really are people that don't study (much) and get an 'A'. However, those people either learn to study at some point, or don't really go that far. They just have an easier ride for a while. A lot of people would consider me to be like that. Fortunately I also know how to work my ass off, but I didn't always.
I was a terrible high school student, and a terrible student my first ~2 years of undergrad. I managed to get pretty reasonable grades the entire time though. For me, I always just hated going to class. I never bragged about outscoring classmates, but if a professor ever made a comment about my grades or somebody happened to see one of my scores, it was apparent what was going on since they'd never see me in class. For example, in first semester gen chem, I went to lecture a total of 4 times (first day, 2 midterms, and the final), read the book the day before the test, and got an A-. I did the same for calc-based physics I and got a B+. Certainly not stellar grades, but there were also people that worked there ass off for lesser scores. Again, I tried my best to hide any of that simply because I don't like that kind of attention. I was simply a bad student who would actually do OK on tests, and I knew that would rub a lot of people the wrong way.
After a couple of years, I got the partying out of my system, started becoming more interested in the material, and would study things simply because I was interested in them. I work my ass off now, and it feels good. The people that noticed I got good grades without working when I was a freshmen that were able to not be jealous / bitter / whatever about it became good study partners later on. They realized I was smart and would come to me with questions, and in turn their work ethic wore off on me. The people that were competitive with me and never let it go would still try to compete with me even though I wasn't competing. It didn't do them any good, and I really couldn't care less because they were *******s about that too.
I think it's important to realize that being smart has the potential disadvantage that you don't need to learn how to work hard until you're pretty far along. In fact, if you're the right kind of lazy, you can get by without ever working very hard at all. Those people will never go on to be surgeons or revolutionize their field simply because those things take work regardless of how intelligent you are. I know a few people like that.
Long story short, if someone is bragging to you about how they don't study, it's probably bull****. However, those people really are out there, but they're probably not who you think they are. Regardless, what does it matter to you? As someone pointed out earlier, you should do what YOU need to do to be successful. The recipe isn't the same for everyone. If it means studying 40 hours a week, do that. If it means relaxing the day before a test, do that. Don't get into this cutthroat, I-need-to-outdo-everyone rut, otherwise you could easily get stuck in that for a very long time. Find a few classmates that you enjoy being with, that push you to be better without competing with you, and ignore the rest.