Autopista vs. carretera

In Spanish, the terms 'autopista' and 'carretera' both generally refer to roads designed for motor vehicles. However, these two words are not used interchangeably as they signify different types of roads based on their characteristics and regulations.

Autopista

The term 'autopista' refers to a specifically designed high-speed road with multiple lanes in each direction, separated by a median strip, and grade-separated intersections with overpasses. It is the Spanish equivalent for 'freeway' or 'motorway'. Access to autopistas is usually controlled through entrances and exits, and there are often tolls associated with using them.
La autopista estaba congestionada debido a un accidente.
(The motorway was congested due to an accident.)
Tomamos la autopista para evitar el tráfico en la ciudad.
(We took the freeway to avoid city traffic.)
La velocidad máxima permitida en esta autopista es de 120 km/h..
(The maximum speed allowed on this freeway is 120 km/h.)

Carretera

'Carretera' is a broader term that refers generally to a public road, and it is typically used in the context of smaller roads outside major cities. These could be single or dual carriageways. They are more like the English 'highways', which can vary widely in size, capacity, and speed limits.
Es una carretera muy deforme llena de baches.
(It's a very uneven road full of potholes.)
La carretera está cubierta de nieve y hielo.
(The highway is covered with snow and ice.)
La carretera que va al norte está cerrada por las lluvias.
(The road going north is closed due to the rain.)

Summary

While both 'autopista' and 'carretera' pertain to roads for motor vehicles, they specify different types. The term 'autopista' denotes a high-speed roadway akin to a freeway or motorway with controlled access points and often tolls associated. On the other hand, 'carretera' signifies more common public roads that vary in size, capacity, and speed limits - similar to highways - often found outside major urban settlements.