When you are exposed a second time to the same antigens (by way of coming into contact with the actual flu virus), your body is able to recognize the disease, and the antibodies go into action to prevent you from getting the
flu, or to lessen the symptoms and
duration by basically beating down the virus.
Tamiflu isn't a vaccine, nor a substitute for a vaccine. Tamiflu CAN be taken if you're exposed, or very soon after symptoms start.