Red wire to green? Old electric wiring circa 1949 to new dimmer
It sounds like you replaced a three way switch with a two way switch and wired a traveler to the ground. Flipping the second switch created a direct short to ground that can result in enough current to damage the breaker, wiring, and other devices on the circuit. Not only can you damage parts of that circuit, you are creating a fire and electrocution risk.

There are plenty of guides on how to properly wire a 3 way switch both here and other places online, and it's typically a DIY project, but if you're making mistakes like not properly identifying a traveler vs a ground and knowing which wires are hot, I'd advise you to hire a professional to properly replace devices like this.