https://pythonprogramming.net/pygame-python-3-part-1-intro/
this link takes you to a pygame tutorial.
there is a collision between the car and the box in the later stages of the code. this should help.
or alternatively there is this answer on stack overflow:
How do I detect collision in pygame?