This saying has two parts.
Beauty is skin deep:
Meaning it doesn't go as deep as your heart, soul or personality. Beauty is only what you look like, not who you are. Beauty is only on the surface. To have a beautiful heat, soul and personality you have to have beliefs and morals and know yourself.
Ugly is to the bone:
Meaning an ugly personality. Like if you are terribly mean or gossip very harshly and have never done anything nice for anyone your personality is ugly, so you are ugly, to the bone.
Beauty is skin deep and ugly is to the bone:
Meaning if you are a beautiful person in looks, but a mean person in personality, your beauty is only on the outside and your personality is ugly.