Quick answer
Studying a subject is изуча́ть + accusative, or учи́ть for learning it. Being good at it: у меня́ хорошо́ идёт.
The core
The rest
School life
Talking about school
Two subjects with no translation
Труд is a practical craft lesson — woodwork, metalwork, sewing — which still exists in most schools. ОБЖ stands for осно́вы безопа́сности жизнеде́ятельности, “basics of life safety”: first aid, fire safety, civil defence. Both are taken seriously and both appear on the school report.
по + dative for subjects
Marks, exams and textbooks use по plus the dative: пятёрка по матема́тике, экза́мен по исто́рии, уче́бник по хи́мии. It is one of the most useful little patterns in school vocabulary.
Typical mistakes
экза́мен хи́мии
экза́мен по хи́мии
Subjects take по + dative.
Я изуча́юсь матема́тику.
Я изуча́ю матема́тику.
изуча́ть takes a direct object and no -ся.
Check yourself
Which preposition goes with a school subject?