Haha, I don't think you realized how many topics you touched with this question. Let me see if I can answer the most important of them.
Love is a bad word to use when describing behaviour, because it means different things for pretty much every person. So let's talk affection. Al mammals have the capacity for affection, and it drives them to want to be close to the object of affection, and to care for it, through several emotional mechanisms. Affection is not linked to sexual attraction. Before your sexual desire kicks in, you can develop strong affection for a person. You may rationalize that affection and love, and believe you need to establish a couple relationship with said person, but before sexual desire kicks in, this doesn't involve sexual desire.
You can of course develop sexual desire for a person that is object of your affection. And since people tend to be around their objects of affection a lot, it would be very common for people to do so.
Now, while people certainly learn how to behave when children, including the social norms for social interactions and what is expected of them, you do learn how to behave around and towards the objects of your affection and towards the objects of your sexual desire as a child, and the main influence is the main object of your affection. For your average child that will be their parents. Childhood friends may influence you, but never nearly as much as the child's parents. How you "love" then is mostly determined by how the child saw the parents treat each other and how the parents treated the child, and secondarily by how the parents told the child to "love" or relate to others. Anything else is a minor influence.
Furthermore, how should you behave towards an object of affection (the childhood person for example) is contextual, and depending on how you learn this the relationship should be, you'll adapt to feel so it fulfils your expectations.
For example: If a boy has a girl-best-friend, but in his family only people of the same gender can be friends, and when people of different gender are friends it is always implied that they are a couple or are becoming a couple, it is likely the boy will develop romantic feelings for his girl-friend. But if the boy understands that friendship with girls is as valid as friendship with another boy, it isn't so likely that will happen.
This all contingent, of course. It may or may not be. But the environment and development makes it very much likely for it to go one way or another. When you take into account affection + sexual desire pretty much define what a couple relationship is, chances are childhood friends of different genders (or same genders if they are gay) are likely to, at one point, be in love with each other, and how likely this is depends on what the children learn, how often they interact with each other under what contexts, etc. (let's not forget that proposed physiological mechanism that makes us not develop sexual attraction for people we've interacted a lot with since childhood, like our parents or siblings. This also factors in.)
Anyway, this defines how you see your relationship with this object of affection throughout your life, and can also increase attachment. Attachment creates possessiveness, and this is further modified by what the child learned within his family (Possessive parents teach children to be possessive with their partners or want-to-be-partners, and children are likely to accept this teaching). The more attachment, the more it will hurt when the person is not "yours".
There's yet another factor though: Idealization. Remember always that the brain has a hard time making a difference between what really happens and what we are just imagining. Interaction, samples of affection, etc. increase attachment and also keep it alive. So if you fall in love with X during your teen years, but continue having fantasies about being in a relationship with X for several years, even if you don't see X during that time, the attachment will remain and may even increase. This is, again, modified by what you learned as a child and pretty much all other life experiences related to affection (How much you need affection at the moment, how much you think you are worthy of affection, etc.)
"Isn't such a heart-breaking experience, that can prevent our mind from trying to build new relationships?"
Depends on a lot of things. If the attachment to said person is very high and you've not generated attachment to anyone else, it might. If you don't believe you are worthy of love/affection, and thus don't feel it from anyone else but that person, and your mind decides that once loosing this person the most cost-effective course of action is to "give up", it probably will. There are many specific scenarios like this, it's all very contingent.
But not always. You can form attachments to different people, and if you don't re-live the interactions that generated the affection with X, then it will become weaker over time. In the meantime you can, through interaction, form attachment with Y, effectively replacing the object-of-affection. The affection to X might remain, but not as strongly, or not in the same context as before.
Now- when the person loses X, does it look for something similar to X? I don't think so, but I can see how it might look like it.
You chose X for a reason, his/her psychological characteristics "fit" with yours in a way that it allows you to satisfy your needs for affection through X. The mind will look for another entity that can satisfy the same needs, and it identifies it through certain traits, X had this traits originally, since that's why your mind selected him/her as a "viable candidate", so the next person, Y, must have similar traits.
But you don't choose Y because it resembles X. You chose Y for the same reason you chose X- because they both fit the traits that you need to satisfy your needs, according to your mental structure.
Whew. Hope that does it :D