Why do we think the way we think and act the way we act?
How we are socialized is related to what we bring to the table and what we are exposed to in our enviroment. What be bring to the table is "nature" and this can be viewed as our genetic makeup. For example if an individual has a learning disability they will interact differently within a classroom or academic enviroment than someone who does not. When we look at the enviroment we are looking at "nurture", what have we been exposed to that shape our behavior. Starting from being children we are classically and operantly conditioned to react to stimulus in our enviroment through punishment and rewards. When we exhibit a behavior and it is rewarded we are more likely to repeat that behavior. When we exhibit a behavior and it is punished we are less likely to exhibit that behavior again. Over time these behaviors become ingrained (habit) and in term we learn to expect certain reactions for our behavior. Thus if we are rewarded for taking our shoes off before we enter the house by getting a hug from our parents we will always start to take our shoes off and will expect this should always be the behavior that is exhibited.
Since you have tagged this with “sociology” I will answer it from this point of view rather than from a psychological point of view. From the sociological point of view, our actions and thoughts are determined by a mixture of our innate characteristics and the ways in which we have been socialized.
Socialization is the process by which we learn how people in our society are supposed to think and act. We start to be socialized as soon as we are aware of anything. We watch our parents and our siblings and learn from them about what society expects from us. Sometimes they tell us directly how we should think and act, but other times we infer these things from watching them. When we go to school, we learn the same things from our peers. We also tend to learn about such things from the media. When we watch movies, for example, we are being shown examples of what is and is not acceptable in our society.
Thus, we learn how to act and how to think largely by being socialized. Our socialization interacts with our inborn personalities to determine our thoughts and actions.