Cellular membranes are mostly composed of lipids, but depending on which part of the body the cell is located, it can also contain a very large amount of protein. Membrane proteins have various functions. The major two, which I will talk about, are transport and receptors. Also, there are two major types of membrane proteins: integral proteins, which are located through the membrane itself (similar to a nail hammered into a sheet of wood); and the second type are peripheral proteins, which are located only on the surface of the membrane.
Transporting molecules across a cell membrane is crucial to the survival of the cell and the entire organism. Some small particles may be small enough to cross the cell's membrane without the use of a transport protein. An example of this would be oxygen entering the red blood cells traveling through the alveoli (small sacs) in the lung. This type of transport is very simple; the concentration of oxygen in the alveoli is higher than the concentration in the red blood cell, so the oxygen simply diffuses into the blood. This, unfortunately, does not take place for all molecules required by the cell. Larger molecules, such a glucose (sugar), can only enter the cell through a membrane with the help of a carrier protein. A carrier protein is an integral protein that has an open end at the outside of the cell which a glucose molecule can fit into. When the glucose binds to the protein, the protein changes shape (called a "conformational change") which closes the end of the protein exposed to the outside of the cell, and opens the end of the protein exposed to the interior of the cell. The glucose molecule then simple exits the protein and is now inside the cell, ready to be used. Note that this process does not use any ATP and is therefore consider passive transport. This is because glucose is moving down a concentration gradient (there is a higher concentration of it outside the cell compared to inside).
If something is needed to be moved against the concentration gradient (there is a lower concentration outside the cell than inside) then ATP is required and this process is called active transport. For this, again, a transport protein is needed. In many cells, the sodium concentration is very high outside the cell and very low inside the cell, and potassium is low outside the cell and high inside the cell. In order to maintain these gradients, cells need to pump sodium out while pumping potassium in. Clearly, this is moving against the concentration gradient and will require ATP. This is done in one very efficient process. A special type of integral protein called an "antiport" is able to transport three sodium ions outside and two potassium ions inside the cells at the same time. It does this by hydrolysing a molecule of ATP which causes the conformational change which will transport the ions. This is very important for cells such as neurons, which use the movements of sodium ions to fire electrical signals.
Another function of membrane proteins is recognizing external objects. This is done by a group of peripheral proteins called receptors. There are different receptors for different objects, which vary between cells depending on their role in the body. For example, phagocytes (white blood cells) have a very important role, in that they attack pathogens. Another protein called antibodies will coat the outside of a pathogen, such as a bacterium. A specific portion of this antibody called the heavy chain will match up with a specific receptor on a phagocyte cell's membrane. When these two proteins (the receptor and antibody) bind together, this initiates the process of phagocytosis (a Pac-Man style "eating" by the cell). When the receptor has detected its target, the cell engulfs the pathogen which causes the pathogen to enter the cell inside a small enclosure called a pathosome. From there, the cell will fuse this enclosure with another enclosure called a lyzosome which contains hydrolyzing chemicals. When these two fuse, the bacterium is dissolved.
There are many types of membrane proteins, each which is very specific is what it transports or detects. Without these small chains of amino acids, our bodies could not function the way they do.