He gets sentenced to prison, which is inconvenient, unless you don't have any space for him, then he gets sentenced to hammering (exactly what it sounds like), which is what kills or maims him, but it is possible to survive. Giving important dwarves (or just-sentenced ones) armour, removing Urist McHammerer's hammer or replacing it with a nonlethal one, or just walling him up somewhere are all viable strategies to keep important dwarves alive, but kill^H^H^H^H arranging an Unfortunate Accident[1] for troublesome nobles is arguably easiest.
[1]http://dwarffortresswiki.org/index.php/Unfortunate_accident