The Constitution does this in two main ways.
First, various parts of the Constitution and the Bill of Rights protect specific liberties. The Constitution bans bills of attainder, for example, and the 5th Amendment protects us from having our life, liberty, or property taken without the due process of law.
Second, the overall system set out by the Constitution protects us. The Constitution sets up a system of checks and balances with separation of powers. These things make it harder for the government to act. Because of this, it is harder for the government to do anything that might take away our life, liberty, or ability to pursue happiness.