If they want to breed they will, you can only stop the process by separating them. But in many cases if you have other fish in the tank, either the others will eat the babies, or, to keep other fish from eating their young, they will eat them themselves.
But just because you put 2 of the opposite sex in a tank, doesn't mean they will become a compatible pair. With 2 there is only a 50% chance they won't kill each other.