Sometimes, in Lagrangian mechanics, we need to identify the constraints of the problems and using the Lagrange multiplier technique, we got to the equilibrium equations of the problem under study and do some optimization analysis. I used to select these constraints according to the boundary conditions, but my professor said they are not the same.
What is then the difference between a constraint and a boundary condition? How can we know that this is a "constraint" and that is a "boundary condition"? And when they are the same?