These words were spoken by Bruno's grandfather to his son, Bruno's father, Ralf. As Ralf tells Bruno, when he was a little boy there were certain things that he didn't want to do. He gives the example of not wanting to stay at home to do his homework when he'd much rather have been outside playing with the other boys.
But his father always told him that it would be better for everyone if he did such things anyway. Ralf would then put his best foot forward and get on with them. Looking back, he now realizes that his father was right, and he feels rather foolish for having wanted to play outside instead of doing the things he had to do.
Ralf is telling Bruno about all this because Bruno's deeply unhappy with life at "Out-With" and wants to go home. But Ralf points out that his is his home and will be for the foreseeable future. Bruno doesn't want to live in this place; he'd much rather be back in Berlin. But his father wants him to understand that that's not going to happen and that Bruno needs to keep his wants and desires in check, just like his father had to do when he was the same age.