When I look outside the window while travelling by a car, why do closer things seem to be moving faster and appear unclear but the farther ones seem to be moving slower and appear clear?
Why do closer things seem to be moving faster?
This is due to parallax. A very simple phenomenon exhaustively explained on wikipedia.
Why do faster moving things appear unclear?
This is primarily due to retinal persistence also well detailed on wikipedia.
It takes time for the retina to detect a change in light at a given position on the retina. Things that move quickly across your visual field (i.e. retina), or that reflect very low amounts of light tend to blur or simply be invisible. Car headlights moving close to you will blur because it takes time for photoreceptors to 'switch off' and the headlights would appear as a streak or trail of light for you. And similarly, if a car were to move at an incredibly large speed, the car wouldn't reflect enough light to trigger a response in the retina, so it would be unseen by you. Remember that what matters here is how much range of your visual field an object crosses, not the speed of the object itself. For example, a fast car in the distance does not blur since it's crossing a tiny fraction of your visual field, but a slow car right in front of your nose will be crossing your entire visual space very quickly.
These are properties of the retina. It is also possible the encoding of visual information in the brain also plays a role in how your perceive something. However, the illusion you describe is entirely explained by these retinal phenomena due to sensory neuron biology.