Як справи? literally means [How things?], and means something like [How are things?]. Note that the verb [are] is omitted.
ви is the formal form of the word [you], which is used between strangers.
ти is the informal form of the word [you], which is used between friends.
Що ти робиш? which translates word-for-word to [What you do?] is used to ask [What are you doing?], in the sense of [What are you doing right now?].