They're stored in the DB itself in two tables: CMS_ResourceString
and CMS_ResourceTranslation
. You can find out more on the Working with resource strings page in the documentation, which will also help if you need to think about resx
files.
As you can see from the documentation, theDB is the default and the DB gets the highest priority.