1
We passed a very good time at the party.
We had a very good time at the party.
Use have a good/great/wonderful time to say that you enjoyed an experience: ‘We had a great time on holiday.’ ‘I hope you have a good time at the party.’
Do not use pass a good time with this meaning.
2
We passed three days in Madrid.
We spent three days in Madrid.
Use spend + period of time to say how long you stay somewhere or do something: ‘We spent the weekend in London.’ ‘She spent two hours doing her homework.’
You can use pass without an object to say that time moves: ‘The weeks passed quickly.’ ‘Several hours passed before she called.’
We can also use pass the time when we do something while waiting or when we have nothing important to do: ‘We played cards to pass the time.’
See TIME