2' deep is the standard for posts.
2 feet deep is the standard for fence posts, except corner posts. But, a fence post isn't going to stop a car. I've removed chain link fencing (bought it on craigslist, got a great price, but had to remove it myself.) With the exception of one pole that was pounded into the root of a large tree, we pulled every last pole out by hand; all were concreted in place. If I can pull it out, I don't think it's stopping a car.
How deep you'll actually have to go depends a lot on the soil conditions. Nonetheless, if I was trying to stop a car, I don't think anything less than 4' deep would be sufficient. I stop goats, and the corner posts for them are 4'. In fact, look up how to build corner posts for farm fencing (to stop animals) - 4' is the average depth recommended, with 2' depths for the line posts.
Someone above mentioned the posts for chain link fencing. Someone mentioned that if a car hit one, it wouldn't be able to drive away. Seriously? Those posts might stop a kid on a bike, but they're not stopping a car. You can bend them quite easily by hand. A car is not going to be slowed down by one.
My recommendation: get 8' pressure treated corner posts at a farm supply shop; about 8" diameter. They're around $15. Dig 4' deep hole, place post, pour in some concrete, then a few rocks you found while digging, then concrete, more rocks.. About 2 bags of concrete per post, then back fill with remaining soil. They'll stop a car. For what it's worth, have you ever seen a telephone pole that was sheared off by a car? They have a much larger cross sectional area, and are sometimes sheared off; think how easy it is going to be to shear of a much smaller wooden post.
Alternatively, go with the steel pipe that igas suggested (though it would be more expensive) and fill it with concrete. I'm very doubtful that 4" PVC filled with concrete would stop a car. It simply won't have the shear strength. You'd probably need fiber reinforced concrete and a few pieces of rebar in it. Actually, I'm positive that it won't stop a car. I can snap something like that in half quite easily with my tractor. But, from putting in high tensioned fence, while ratching the fence (anchored to my tractor), I can drag my tractor backwards with a properly reinforce corner post system.
edit: I think igas's idea is the easiest method that would be effective. Reason: you can just pound the post into the ground; no digging necessary. But, pound it in as deep as you can get it. Then fill it to the top with concrete.