In an automatic transmission there is a ring with teeth on the output shaft of the transmission. When the transmission is shifted into park a lever called the parking pawl is lowered against the ring. If the parking pawl did not land squarely into an opening in the ring the car will roll slightly and there will be a usually an audible click. The parking pawl now holds the output shaft from turning.
Without the engine running an automatic transmission is effectively in neutral in any gear except park. Theoretically with park engaged also applying the parking brake is not necessary unless the car is on a big hill because the parking pawl has more than enough strength to hold the car from rolling. It is a good idea to exercise the parking brake on a car with an automatic so the system does not freeze up.
PS. In a manual it is suggested to place the car in first gear or reverse then engage the parking brake and for good measure curb the wheels. In the event that the parking brake fails (more common than the parking paw) the engine with the sub one gear ratio will hold the car. The good measure of curbing the wheels will roll the car into the curb in the case that the engine can't hold the car from rolling.