I was a lot like this my Freshman year in college. I would only go to class on exam days. I had already taken Calculus in High School, and thought that I knew it all, so why did I have to go? I thought the teacher's were boring, and I couldn't be bothered with listen or going to lecture. But, then my grades suffered because of it. I got a C in calculus my first quarter (I guess I wasn't as smart as I thought I was!), and a C in my second quarter physics class (barely passed) and I failed Linear Algebra my third quarter (I thought "Oh, this is just easy math, I don't have to go to class and study, because its soooo easy", but then I didn't know anything when it came to exam day). I seriously considered switching majors, but I was set set on physics.
What changed was I decided to go to EVERY lecture (except some, IMHO, useless humanities lectures, which I did not have to struggle with anyway). So I went to EVERY physics and math lecture (no matter how boring or useless), I wrote down everything the teacher did (I mean EVERYTHING that was on the board was in my notebook, and more), and most important of all, I did my homework (where the real learning is done). When I couldn't solve a problem, I asked friends in class, or I would go to office hours for help. The result was that I actually did well in most of my classes (advanced linear algebra was one exception where I got a C, but to be honest as an undergrad course, it was way harder than any graduate class I've taken), and I really started to think of lectures as really really fun, where the teacher was teaching me things I didn't already know (isn't that why we are in college?).
It didn't mean I studied all day. Quite the opposite, I had plenty of free time, because its more an issue of management and pacing yourself. I would not spend everyday studying physics or math (this can drive anyone crazy), but would space it out. This means I would not study on some weekdays, and put in a couple hours on a saturday or sunday (1-4 hours doing homework on a saturday still means you can play frisbee with friends, or work out, and you definitely still have all night to drink as much as you want and party).
And one last thing. I attended more class when I lived far from campus then when I lived on campus. When I lived on campus, I would skip class and drink beer (or other things) and convince myself "Hey, I'm still AT school". But when I lived off campus, it ment getting my butt all the way to campus (walking and taking the bus), and the thought of leaving campus to go home to party/sleep/wate time seemed like so much work (bus home, then walk from the bus stop), that it was just easier to stay at school and go to class.
So to tie up this long thread, I would just recommend GO TO EVERY CLASS, EVEN IF ITS SUPER BORING! I mean, that's why you (or your parents or financial aid) is paying so much money, don't waste it.