Several things could be causing the clunking noise you hear when putting your car into gear. The most common is a problem with the transmission, but it can also be caused by the motor mounts or even sensors.
Typically, when you shift your vehicle into reverse or drive the engine and transmission will start to climb in speed. However, if you park on an incline or your transmission has a problem with rev hang it can make shifting into reverse and drive difficult and cause the clunk you hear.
Another possible cause of this is a low transmission fluid level. This can be due to contamination or simply high mileage, and the easiest way to check is to use a transmission dipstick. If the mark is close to the cold line or lower then you will want to add some more transmission fluid to the car in small doses until it reaches the correct temperature and marks the warm mark on the dipstick.
Finally, the clunk you hear may be the result of a faulty transmission pilot bearing or bushing. This is a common problem with automatic trannys and can be very expensive to replace. If this is the case then you will need to take your car in for a professional diagnosis and estimate of repair cost. They will likely recommend replacing all of the transmission bearings as well. This is the only solution that will completely fix the clunking issue and stop it from happening again.