could someone explain the selection rule and how it's used?
It's selection rules, not just a rule. When you calculate the transition probability between two quantum states labeled by the relevant quantum numbers the selection rules tell you which transitions are allowed. In other words the rules tell you how the quantum numbers are allowed to change in transitions between states.
Check out applications of Wigner-Eckart theorem.
Separate names with a comma.