You get the maximum credits for any module you pass. For instance, in a 20 credit module, you still get 20 credits, even if you only scrape a pass. You normally cannot pass a year without getting the full 120 credits, although some Universities may allow you to progress if you fail one module.
In terms of identifying the classification of your year, it is generally an average based upon your mark for each module. For instance if you got 72 for three of your modules and 68 for the other three, you would get an overall grade of 70, giving you a 1st. However, it's a little more complicated than that because some modules are only worth 10 credits, and thus have less of an impact on your final grading.