Richard is in France because Philip II Augustus of France has been taking over territory which belonged to Richard. In fact, Philip had plotted with Richard's brother, Prince John, to completely overthrow Richard while he was gone but John failed and reconciled with Richard, leaving Philip II wide open to counterattack.
For a time, Richard Lionheart has been very successful against Philip. Richard has been using all his military skills on the field as well as his diplomatic skills to gain allies and isolate Philip. The arrow that hit Richard was a lucky shot from a young boy seeking revenge for his own dead family members.