You can practice shifting from D to N and N to D, with the car off. Just turn the key to the first position,ON, and it will release the gear lever when you apply the brake pedal. Once you see that there is no detent or gate between N and D, then you will appreciate the simplicity and ease with which you can do this while driving. Engage the parking brake if on an incline because the car will easily roll on a slope. You can practice shifting through all the gates like this and determine which require the brake pedal to be pressed and which don't.
For example, your foot must be on the brake pedal to put it in, or take it out, of Park, so it likely can't be done while driving. Park includes an actual locking mechanism in the gearbox so the tires would lock up and skid if it were done while moving.