When all targets of a spell or ability are not legal when the spell or ability resolves, the spell or ability is countered on resolution. This used to be called ‘fizzling,’ and some people still refer to it as that.
When a spell or ability is countered, no part of it will resolve. Some spells like Slice in Twain have two effects. If Slice in Twain targets an artifact or enchantment and that target is no longer be legal when Slice in Tain resolves, then no part of Slice in Twain will be applied. This means that the controller of Slice in Twain will not draw a card.