" If I already pass the 40%(pass mark) of module, but fail in exam(lower than 40%), do I need to resit the exam? Is is pass or not? "
I depends on your university's rules (and sometimes module-specific rules).
Sometimes, simply getting an overall pass mark for the module is sufficient. In some cases the rules might say that you need to get a pass mark in each individual component of the module. Or, for example, you might need to get at least 35% in each component, and a pass overall. Or that you need to make a bona fide attempt at each component (i.e. you can't just hand in a blank page) and get an overall pass.
There's simply too many possible options for anyone to make a guess. You need to check the applicable regulations to find out.
I am first year of uni student, and this question makes me crazy...
" If I already pass the 40%(pass mark) of module, but fail in exam(lower than 40%), do I need to resit the exam? Is is pass or not? "
It depends on the academic rules of your university. Most of the time though you just have to get 40% in your module, even if you fail the exam. Universities also have condonation rules- ie you are allowed to fail upto 1 or 2 modules before you are called for a resit. However, this may vary from different universities ex if they do this only in 2nd and 3rd year.