Modern phonics teaching introduces digraphs and trigraphs at an early stage of the process, so children learn to recognise these. My partner is a specialist phonics teacher and places a dot underneath each digraph, trigraph or individual letter sound so that they can quickly recognise the components.
So boil will have a dot under b, one under o-i and one under the l.
They can then spot that oi is a digraph; in the early stages they do this by saying out loud, an o and a i make 'oy'