The basis of the story is that a Jew was beaten up on a path. The first person who came along was a Priest who simply left the man, the next person to come along was a Levite. A Levite is someone who helps priests, who also left the man. The last person to come along was a Samaritan; Jews didn't like Samaritans and didn't treat them very well. The Samaritan felt compassion for the man and helped the man get better and paid for his hotel.
Jesus told this story to his followers.
This is very unusual as the Samaritan should have left the Jew because of what the Jews did to them but instead helped the man. This shouldn't have been accepted as the Priest and Levite should have helped the man. Jesus was telling his followers that they should love all people, even if they treat you badly. This is where the saying “love thy neighbour” meaning love everyone.