What does ~ and ^ mean before version number after module name in composer.json?

Sorry for this newbie question:

What does ~ and ^ mean before version number after module name in composer.json ?

"mageplaza/module-core": "^1.4.1"

"sebastian/phpcpd": "~3.0.0"