James is right – some people are primarily or exclusively sexually attracted to children. Some even believe that they are not abusing a child but showing them love. We don’t understand the causes, but often this can last a lifetime. Many researchers consider pedophilia to be a sexual orientation.
Mark is of course right that for many people who identify as homosexual that won’t change throughout their lifetime. It’s not quite that simple though, and women in particular often experience a fluid sexual orientation well into their twenties. You can’t ‘cure’ someone of being gay.