Traits in Rust are used to define shared behavior that multiple types can implement. This allows writing functions that accept any type implementing a trait, enabling code reuse and flexibility. For example, a trait Speak defines a method speak(). The struct Dog implements Speak by providing its own speak() method. A function make_speak takes any type implementing Speak and calls speak() on it. When make_speak is called with a Dog instance, Dog's speak() runs and prints "Woof!". This shows how traits let us write generic code that works with many types sharing behavior.