For ticks it'll take around 48 hours and for worms it'll take around 24 -48 hours, sometimes even up to 72 hours.
The wormer will start working soon after ingestion as it gets absorbed from the stomach and intestinal tract but getting rid of the worms can take a couple of days.