Who are the people influence us with good or bad habits and in the end help to be a successful or unsuccessful person?

Friends, family, and teachers have a big influence on how you feel, think, and behave.
Parents come first. As they're present from infancy, a child is very much influenced by the parents. It might be habits, language, eating habits, table manners, traditions and customs, etc which form the base of the child's personality development.
When the kid starts schooling, he or she spends almost half the day with the teachers and friends. Thus teacher's behavior influences the child's character.
Have you heard of imitational learning? It is also called as rote learning. It's a sort of learning where the child incorporates or learns things through observation without knowing the exact meaning of what is being taught. He or she imitates. For an example, when a teacher shows actions while teaching a rhyme, the child learns the actions first and then learns the connection between the words and the respective actions, often not knowing what exactly it implies till the teacher explains neatly. So teacher's behavior towards students, apart from teaching, also influences their character development. If the teacher is very sweet and kind enough to teach the same topic again even after repeated times, the student also develops a sense of love and affection which in turn forms the basis for the child's psychological and emotional health, socio-emotional development and cognitive development.
Friends influence the child extremely in the preadolescence and adolescence age. Everyone must know-how, as teenage is considered as the “age”. So yes, all the three influence the child's character.
If answering these questions convinces you that your friends are indeed a foul influence, must you dump them? Unless they're really bad, probably not such a dramatic act might harm your psychological health even more than they're harming it. What you can do is shift how you spend your time. Get together less frequently with them, and work on finding new friends who really "get" who you're and what you value.
Here are five reasons you should be careful whom you surround yourself with:
1) Strong-willed friends can increase your self-control.
2) Fewer friends increase the likelihood you'll take financial risks.
3) Close friends may be the key to longevity.
4) Friends can greatly influence your choices.
Find out more here,
https://bornrealist.com/good-friends-influence-future/
https://www.quora.com/Who-influence-the-child-most-parents-teachers-friends
https://www.huffpost.com/entry/friends-family-health-influence_n_1000829