Refill reminders are sent when you are 3 doses away from depleting your current medication. 

This is determined based on the value you input for "Doses Left" when adding medication to Care Plans.

Additionally, you may also activate automatic Refill Reminders which are sent regardless of if your total doses aren't lower (in the case of you missing to record you took the medication on Care Clinic). 

These values are configured on the web by clicking the "Edit" button next to the medication in your Care Plan.