It can be used literally, referring to two actual heads, or figuratively to represent:
* Two different perspectives or opinions. For example, "Dos cabezas piensan mejor que una" (Two heads are better than one).
* Two people working together. For example, "Necesitamos dos cabezas para este proyecto" (We need two heads for this project).