Res publica is a Latin phrase, loosely meaning ‘public affair’. It is the root of the word ‘republic’, and the word ‘commonwealth’ has traditionally been used as a synonym for it; however translations vary widely according to the context. ‘Res’ is a nominative singular Latin noun for a substantive or concrete thing – as opposed to ‘spes’, which means something unreal or ethereal – and ‘publica’ is an attributive adjective meaning ‘of and/or pertaining to the state or the public’. Hence a literal translation is, ‘the public thing/affair’.
Res publica usually is something held in common by many people. For instance a park or garden in the city of Rome could either be ‘private property’ (res privata), or managed by the state, in which case it would be part of the res publica.
Taking everything together that is of public interest leads to the connotation that the ‘res publica’ in general equals ‘the state’. For Romans this equalled of course also the Roman Empire, and all its interests, so Res Publica could as well refer to the Roman Empire as a whole (regardless of whether it was governed as a republic or under imperial reign). In this context scholars suggest commonwealth as a more accurate and neutral translation of the term, while neither implying republican nor imperial connotations, just a reference to the state as a whole. But even translating res publica as ‘republic’ when it clearly refers to the Roman Empire under Imperial reign occurs (see quotes below).
Roman authors would also use the phrase res publica in the sense of the era when Rome was governed as a republic, that is the era between the Roman Kingdom and the Roman Empire. So in this case res publica does distinctly not refer to the Roman Empire, but to what is generally described as the Roman Republic.
Res publica could also be used in a generic meaning, referring to "public affairs" and/or the general system of government of a state. In this usage res publica translated the Greek concept politeia (which originally meant the state organisation of a city-state). Also, for a Roman politician engaging himself in the res publica, a translation can often be the even more generic "being occupied in politics".