A police force generally provides these protections from internal entities - ie within an area controlled by the government which employs them. A military force provides the same functionally externally - ie provides protections from those outside the region controlled by the government which employs them. In many parts of the world this distinction is not made.
See