Donors can choose to display their donation under a different name than the one recorded in their donor record using the "Display Name Options" field on the Donation record. Donors can select from "Display my name" or "Display my donation under a different name".
This setting is managed in the Admin, under Forms > Donation Settings > "Allow donors to enter a different name for display purposes".