The pasuk uses a strange phrase, 'לרצונו לפני ה, The standard pshat is as Rashi comments that כופין אותו עד שיאמר רוצה אני, that every Jew really wants to do mitzvos and by forcing them we are just bringing out their true desire.
The Chasam Sofer explains the pasuk as follows. He says that the pasuk is teaching us an educational lesson. A person has to take his children אל פתח אהל מועד, send them to yeshiva, take them to shul, show them kedusha, even against their will, and then when they get older, Yiddishkeit will be לרצונו לפני ה for the child. The child will do mitzvos out of his own free will if when he is young we make sure to bring them אל פתח אהל מועד.