The film is about two stereotypically "quiet kids" who do not socialise with their peers but are a perfect match for each other — together, they make up their fantasy world. The boy is "the hero" who must rescue imaginary inhabitants of the local forest from something evil (I don't specifically remember what the 'evil' was). The girl is the dominant one and encourages the boy's delusion. I think she is about 12 years old and has blonde hair (if my memory still holds true). Judging by my memories of the artistic style of the movie, I guess it was made somewhere in between 2000 and 2010.
The novel tells the story of fifth grader Jesse Aarons, who becomes friends with his new neighbor Leslie Burke after he loses a footrace to her at school. She is a smart, talented, outgoing tomboy from a wealthy family, and Jesse thinks highly of her. He is an artistic boy from a poorer family who, in the beginning, is fearful, angry, and depressed. After meeting Leslie, his life is transformed. He becomes courageous and learns to let go of his frustration. They create a kingdom for themselves, which Leslie names "Terabithia."
The movie and novel have a famously dark ending, in which
Leslie falls into the creek that they use as the border of Terabithia, getting knocked unconscious and drowning.