Friction on cars It is known that friction is given as :
$F_{friction}=\mu F_n$ , where $F_n$ is the normal force, and $\mu$ is coefficient of friction.
For a car travelling down a hill with constant velocity, the component of the gravitational force which is parallel to the cars velocity must be equal and opposite to the frictional force, whereby the frictional force opposes the motion of the car.
However, when the car is going up the hill, for a constant velocity to be obtained, the frictional force must be going up the hill, in the same direction as the motion of the car, and equal and opposite to the gravitational force which is antiparallel to the cars velocity. 
I thought friction always opposes motion?
How can a car accelerate with the same force (i.e. friction) which also causes it to slow down. If there is no friction, a car cannot accelerate?
 A: Friction tries to reduce (kinetic friction) or prevent (static friction) relative motion between two bodies.
Think about a car starting from rest on the flat.
To do that the frictional force on the tyre due to the ground must be in the forward direction.
The reason is that when the wheel is made to rotate by the motor the tyre will start slipping relative to the ground and the friction force will try and reduce this relative motion between the tyre and the ground by moving the car forward.
For no slipping the translational acceleration of the wheel $a$ must equal $r\alpha$ where $r$ is the radius of the tyre and $r$ is the radius of the wheel.
The static frictional force is responsible for these accelerations.
Update
Kinetic friction forces will try and reduce the relative motion between between two surface. 

In the left hand picture imagine that the the rotational speed of the wheel $\omega$ is too fast or the translation speed is insufficient so that there is slipping between the tyre and the ground.  
So the frictional force on the wheel due to the ground does two things to try and reduce the relative movement between the tyre and the ground.  


*

*The frictional force tries to increase the linear speed of the wheel
to the right.

*The torque about $O$ due to the frictional force tries to reduce the
rotational speed of the wheel.  


Both of these effects then making the wheel move closer to the no slipping condition $v = r \omega$.
The right hand diagram has the translational speed too great or the rotational speed to slow and in this case the frictional force tries to make the wheel rotate faster whilst at the same time trying to make the translational speed of the wheel slower.
A: Your thinking and question is good. The issue is that you seem to have misunderstood, which friction is actually present. 


*

*Kinetic friction is present when surfaces slide (when you push the dinner table through the living room). The formula is: $$f_k=\mu_k n$$

*Static friction is present when surfaces don't slide but try to (when you push the table, but not hard enough to make it move). The formula is: $$f_s\leq\mu_s n$$


Both have a direction that counteracts sliding. Note that the latter is only a maximum formula - the value could be anything from 0 up to this value, so it is not very useful unless you know that you have the limiting case. 
When an object slides over the road, we see kinetic friction. But a car doesn't slide. It's wheels roll. At the point of contact with the ground they are in fact exactly stationary. They don't slide. No kinetic friction. They stand still in that very point like the table you are pushing not hard enough to move. 
Now to the specific situation of a car driving uphill:


*

*Is a car parked on a hill, then static friction holds on to it by pulling upwards and balancing gravity that pulls down. Naturally. 

*Is a car accelerating uphill, the same is the case, but with an even stronger static friction since the car is "pulling itself forward" by gripping the ground with the wheels. 

A: When your wheel is powered by the engine the wheel pushes backward and reactionary friction force opposing this pushes your car forward.Same as the case when we walk.The feet push backwards and the reactionary frictional force pushes us forward.The friction is in a direction opposite to the direction we are pushing in and in the direction we want to move.
When the car is moving without powering  the wheel the wheel is not pushing back but is simply rolling forward and the frictional force develops accordingly to oppose this.
A: I think the misconception that arises is frictional force doesn't opposes the motion of a body but in deeper sense it opposes relative motion between two surfaces in contact which are different things. Hope it solves your problem. 
