Thank you @monsterer2 , this certainly helps. I still have more questions though.
So difficulty is adjusted with each block according to the network hash power. Network hash power is measured by the speed with which a block is discovered, correct?
So how is a 51% attack possible? As I understand it, the new block header must be hashed using the previous block header. Why then does controlling a certain amount of the network power enable double spends?