Darcy and Wickham had history. They had been raised together,
and Darcy learned to distrust Wickham because of his bad habits,
such as gambling. Wickham was to inherit a position on Darcy's
estate, but asked to take money instead, which he was given. After
he gambled this away, he came back for more, which was refused. He
then tried to elope with Darcy's sister, and almost succeeded.
In the book, they clearly do not want to be near each other.
Wickham tells lies to Elizabeth and others about their connection,
and Elizabeth takes sides without close examination of the truth.
Later, when Darcy has reason to defend his honor on the subject, he
sets the record straight, convincing Elizabeth of the truth.
When Wickham elopes with Elizabeth's sister, Lydia, Darcy hunts
them down and bribes Wickham to marry her for the sake of the honor
of the family, to ease Elizabeth's pain on the subject. This is
expensive, as it means purchasing an army commission, paying off
Wickham's debts, and providing some amount of cash.