A consistent bedtime routine, or a set of specific 'rituals' before lights out, will signal to your child that it's time to sleep. Just as the daily schedule keeps the body clock on track, they will learn to associate a bedtime sequence with sleepiness.
The crucial elements are that bedtime rituals are calming, and end in the place your child goes to sleep. The routine should end with the favorite part, such as hearing a favorite story.
At a few months old, the routine just take a few minutes (nappy change, pajamas, lullaby), but if repeated in the same order every day, the pattern will be recognizable. For toddlers a routine including bath time and books might be up to 45 minutes, time it so that it doesn't need to be rushed. For preschoolers, a chart on the wall showing the steps in the bedtime routine can reinforce the sequence and make it easier for you to avoid attempted diversions “that's not what the chart says”.
A 2015 survey of over 10,000 children aged 0-5 years across the globe found that a consistent bedtime routine was associated with longer sleep time, fewer behavioral problems and fewer nighttime awakenings. The younger the routine started, and the more frequently it was followed, the better the child's sleep (Mindell 2015).