What is the difference between the discount window and Fed repos?
Economically, they are both loans against financial instruments. The difference is the collateral posted - repos by the Fed are generally against Treasury securities. This is not a small difference: it makes it much easier for a bank to access liquidity, since not all of its assets are Treasury securities.

There’s a mechanical difference: a discount window operation is borrowing, while a repurchase agreement is matched pair of buy/sell orders. 

Historically, there’s a big difference: banks only went to the discount window at the Fed if they faced liquidity problems. I.e., the Fed is the lender of last resort. This was greatly discouraged, as it was a signal that the markets did not consider the bank to be viable, and the regulators would want to know why. Since the Financial Crisis, there have been efforts to remove that stigma.