Teaching baby to latch on right

How long after birth(in days) can it take the average child to learn how to latch on right?

Have heard all these tips on how his mouth should be open and nipple at the back of his mouth etc, n that you teach the child how to latch on correctly. But how long do I have to do all that? Or how many times till baby understands how he is supposed to open mouth n latch. Can he then do it on his own?