Immutable borrows (&T) let you read data without changing it, while mutable borrows (&mut T) let you modify the data but prevent any other borrows from existing at the same time.
fn main() {
let mut number = 5;
// Immutable borrow: can read, cannot write
let immutable_ref = &number;
println!("Read: {}", immutable_ref);
// Mutable borrow: can read and write, exclusive access
let mutable_ref = &mut number;
*mutable_ref = 10;
println!("Modified: {}", mutable_ref);
}