Neither I am sorry. "Do you know how to drive?" Is the correct way to ask this. "do you know driving" is grammatically correct but it sounds like you are talking to someone who has never seen a car before. Like have you ever heard of "driving", or do you know what "driving" is. If you want to find out if someone CAN drive you should say "do you know how to drive?"