Study school assignments carefully; prepare for classes by reading and doing homework.
How many times have I told you, Johnny! Make sure you spend at least 2 hours at library before you hit the books!
This idiom says that when you really study hard, you hit the books. Why hit? Hit has many meanings. Among them are to come into contact with something forcefully (The bomb hit its target) and to achieve something you desire (He hit upon the right formula).