If you control two or more legendary permanents with the same name, you choose one and put the rest into the graveyard.
Playing a second copy of a legendary creature usually just replaces the first.