The doctor first makes the baby sick by giving him what is probably Ipecac (something to make you vomit); this is to accentuate the symptoms of poisoning so that Kino and Juana will be grateful when he "saves" their son and reward him with a big bonus.
However, Kino picks up on the doctor's scheme but can't be sure of his ill intentions and must go along with his "professional" care. So Coyotito writhes and vomits under the influence of the "medicine" and then indeed does get better. In the meantime, the doctor mentions the pearl and is attentive to watch Kino closely to note where he looks in apprehension. There is another "visit" later in the night because of this; the doctor sends someone to unearth the pearl and steal it, but Juana has had the foresight to hide it in another place. There is a scruffle in the dark between Kino and this intruder, and the would-be thief is killed.