I switched catalogues in the normal way but when switching back a pop up box says the catalogue cannot be opened because another application already has it open. I don't have another application, I only have Lr on my desktop and no other devices. I am using Lightroom not lightroom classic.
You must be using a Standalone version of Lightroom 5 or 6.
The error message "cannot be opened because another application already has it open." indicates that the Catalog is 'LOCKED' - usually because it was not closed/exited in the correct manner when last used.
Normally 'switching Catalogs' would not cause this problem.
With the File Browser (Finder/Explorer) Find the 'Locked' catalog folder and delete the file with the file-type suffix of .LOCK. (eg. like- Catalog Name.lrcat.LOCK)
Do NOT delete anything else!
Then [double-click] the .LRCAT file to open the Catalog.