What is the difference between docker pause and docker unpause?

We can successfully execute the command docket pause only if the docker container is in running state.

We can successfully execute the command docket unpause only if the docker container is in paused state.

I think internally its deallocating (during pause) and reallocating (during pause) the resources.