Anti-malarial pills can prevent and treat malaria. There are numerous types and combinations. Some include quinine, chloroquine, artemisinin and even some antibiotics like tetracycline and doxcycline.
More information is necessary to answer this questions. There are many drugs that are used for malaria including but not limited to: mefloquine, doxycycline, atovaquone/proguanil, and chloroquine.
The original malaria pill was based on quinine, which is derived from the bark of a tree from Peru. It is the same ingredient that gives tonic water its distinctive taste. Modern pills often have it or chemically similar compounds in them.