The correct answer is all of the above.
Your body can get antibodies through immunizations (such as vaccines), by being exposed to a virus (where your immune system produces antibodies in response), or in some cases, through passive immunity (such as receiving antibodies from another source).