The first two years - depends on the school, how close apartments (whether school own/operated OR privately owned) are to campus, and how accessible public transportation is (when you need to go shopping, etc)
The third and fourth year of medical school (no matter MD or DO), you will definately need a car. You need it to get to rotations. Even if the clinical site is in the same city, waiting at a bus stop at 3AM so that you can make it to "big city hospital" by 4AM to pre-round on surgery will be brutal and insane (as well as waiting for the bus post-call so you can go home and study). If you attend a DO school where clinical rotations are in a different part of the country than the school's physical campus, rotations will be more of a challenge (even if they provide housing, it may not be within walking distance to the hospital).
*this applies to MD school as well, even those with major hospital located on campus. You'll be hard press to find an MD student that will do ALL of 3rd and 4th year clinical rotations at one spot.