In China, 公安 refers to the police system specifically. The Ministry of Public Security (公安部) is the national police authority. 警察 (jǐngchá) means 'police officer' as a person.
usage
Common compounds: 公安局 (public security bureau), 公安部 (Ministry of Public Security), 公安机关 (public security organs).