These two words sound the same and look very similar, but they have very different meanings! Let's look at "breach" first.
breach: The act of breaking; a break or rupture. An infraction or violation, as of a law, trust, faith, or promise. A gap made in a wall, fortification, line of soldiers, etc.; rift; fissure.
So anything involving a break is a "breach". If you're writing a big battle scene, or if you're writing something legal, this is the word you want. Here are some examples:
"They've breached the outer wall!" Aragorn shouted. "Fall back, fall back!"
"This is a serious breach of my trust, Harry," Dumbledore said quietly. "You must leave the Mirror of Erised now and never come back to this room."
As the sea serpent's fin breached the surface of the lake, the crowd of Hogwarts students oohed.
And of course, there's the most famous use of this word:
Once more unto the breach, dear friends, once more;
Or close the wall up with our English dead.
In Shakespeare's play Henry V, Henry gives a rousing speech in Act III. An English king, Henry is leading his troops in an attack on a French city. The troops have breached the walls, creating a gap, and Henry urges his men forward again either to win the battle or die in the attempt.
The word "breech" has quite a different meaning:
breech: the lower, rear part of the trunk of the body; buttocks; the hinder or lower part of anything; in ordnance, the rear part of the bore of a gun.
So if you're talking about the rear parts of anything, from a person's rear to a gun's rear, "breech" is the word you want to use. A more familiar word might be "breeches", which means "pants" - if you think about how breeches are designed to cover your rear, it might help you remember the meaning of "breech"!
By extension, "breech" also applies to situations where something is facing the wrong way. This is where we get the term "breech birth".
Here are a few examples of "breech":
With the use of a Flippendo charm by an experienced healer, the potentially serious problem of a breech baby can be corrected without risk.
Aragorn rose early, pulled on his breeches, and headed downstairs. He was back with breakfast before any of the hobbits awoke.
"Do not ask O'Neill about your firearms," Teal'c said stiffly. "I do not wish to hear more about recoil-operated, locked-breech semi-automatic 9mm weapons."
Between "breach" and "breech", the more commonly used word by far is going to be "breach". That's probably the word you'll want, but do a quick check: are you talking about something that's been broken, like an agreement or a wall during a battle? Then you definitely want "breach".
On the other hand, if you're talking about something's rear, the word to use is "breech". Here's one little trick that might work: imagine the double-e in "breech" as looking like, well, someone's rear, perhaps Aragorn's shapely rear as he pulls on his breeches. Now I know I'm never going to forget this word again!
Definitions from dictionary.com. I also consulted DailyWritingTips's and The Grammarist's articles on this topic. Info on the use of "breach" in Henry V from the Phrase Finder.