The priniciple of double effect is basicly that something is done for a certain effect but it also has an unintended second effect.
There is an example in the Catechism.
2263 The legitimate defense of persons and societies is not an exception to the prohibition against the murder of the innocent that constitutes intentional killing. “The act of self-defense can have a double effect: the preservation of one’s own life; and the killing of the aggressor. . . . The one is intended, the other is not.”
So in the case of self defense, the intended effect is preservation of your own life. The unintended second effect is the death of the person trying to kill you.
This also works with the two examples given by marcadam, that would be ectopic pregnancy and abortifacient chemotherapy.
For ectopic pregnancy, the fertilized egg has implanted outside the uterus, usually in the fallopian tubes. If left it will kill the mother along with the child. So the fallopian tube must be removed to save the mother’s life with the unintended second effect of killing the child.
Same goes with abortifacient chemotherapy. The chemotherapy ends up killing the unborn child yet that is not the intent of the chemotherapy.
Hope that helps!