If you think about it, you can guess at the answer to this : work hard, do the required reading/classwork/revision and write well thought out assignments. There isn't a magic trick here - the people who put in the work 100% from week 1 of the course and do that consistently for every week of the 2 years are the ones who succeed. Yes, intelligence and aptitude for the subject helps but even if you have all that and do no serious work you won't get a decent grade, ie. If you do your homework on the bus and mess about during lessons don't expect to get an A grade.