The preposition ПО has a few meanings, and it usually governs the Dative case:
1) along, on: Я шёл по улице.
2) Around, in different directions: Он бегал по комнате.
3) On the surface: Он постучал рукой по столу.
4) According to: По закону он должен вернуть деньги. Самолёт вылетел по расписанию.
5) By means of communication: Можно я позвоню вам по телефону?
6) Related to some sphere of activity, field of knowledge: Она специалист по местному законодательству.
7) When it is necessary to show the regular action repeated on some days or periods of time:
По четвергам они ходят в спортзал.
8) Shows the reason, similar to the meaning of “due to, because”: Я сделал это по легкомыслию.