To change your family name, tap on your family crest (top left) and then tap the "edit" icon next to your family name at the top of your profile page.

The first family name change is free, but any further changes will cost a little bit of gold.

You can rename Nobles in the nursery as frequently as you like for free, by tapping on the "edit" icon next to their name in their profile page.

Once they are matured and leave the nursery you can change their name for a small amount of gold by tapping the "edit'' icon, again through their profile!