Firstly, you need to understand that there are two main types: Passive Immunity and Active Immunity. We will take them one by one and break them down now.
1. Passive Immunity:
As its name suggests, passive immunity is acquired "passively" from the mother. Immunoglobulins can be passed from the mother to the foetus through the umbilical cord. In simple terms, the umbilical cord is just the connection between the foetus and mother that provides nutrients and oxygen. Immunoglobulins can also be acquired passively through lactation and breast feeding. The passage of Immunoglobulins then leads to the creation of antibodies which are essential in the immune response.
2. Active Immunity
This is an active process and it is acquired through an infection where the body creates certain immune cells in response to a bacteria or a virus. This can also happen artificially, when you get vaccinated. Vaccines contained weakened forms of viruses or bacteria that cannot produce an infection, but that are enough to stimulate your immune system in order to produce immune cells against it.
Finally, you may have seen some books mentioning Active Natural or Active Artificial. What that means is just the way in which your immune system is stimulated. As its name suggests, Active Natural Immunity refers to a natural infection that stimulats production of your immune cells. On the other hand, Active Artificial Immunity refers to immune cell growth in response to an Artificial factor such as a vaccine.