1. Don't use a cell phone while you are driving.

2. Don't use a cell phone while you drive.

3. Don't use a cell phone while driving.

4. Don't use a cell phone driving.
-----------------------------
Which ones are grammatical? Does #3 mean #1 or #2?

1, 2, and 3 are all fine.

4 is not used.

Out of the four sentences you provided, sentences #1, #2, and #3 are grammatically correct. Sentence #4, however, is grammatically incorrect because it lacks the word "while" between "phone" and "driving."

Regarding the meaning of sentence #3, it is closer in meaning to sentence #2. Both sentence #2 and #3 convey the same meaning, which is asking someone not to use a cell phone while they are driving.