How to perform hard / cold reboot of iPhone or iPad? I understand that when I press and release the power button on the top of my iPhone or iPad, it stays on but turns off the screen.

Whereas if I press and hold the power button, a "slide to turn off" control appears on the screen.

Sliding this, as I was told, does turn the unit off, but it does so by suspending the RAM to disk (flash memory, actually.) So, when turning on the iPhone or iPad, it isn't so much rebooting the OS as it is resuming it from flash storage.

How to force the OS to completely reboot on these devices?
See Restart your iPhone, iPad, or iPod touch - Apple Support:

iPhone 8 or earlier
Press and hold the Home and Power Button until your iPhone / iPad reboot (ignore the &quot;Slide to turn off&quot;), you can release both buttons when you see Apple logo.
iPhone X
Press and hold Volume up [or down] and Power Button until your iPhone reboots (ignore the &quot;Slide to turn off&quot;), you can release both buttons when you see Apple logo.

See If your iPhone, iPad, or iPod touch won‘t turn on or is frozen - Apple Support:

If your screen is black or frozen
If your screen is black or frozen, you might need to force restart your device. A force restart won't erase the content on your device. You can force restart your device even if the screen is black or the buttons aren't responding. Follow these steps:

On an iPhone X, iPhone 8, or iPhone 8 Plus: Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then, press and hold the Side button until you see the Apple logo.

On an iPhone 7 or iPhone 7 Plus: Press and hold both the Side and Volume Down buttons for at least 10 seconds, until you see the Apple logo.

On an iPhone 6s and earlier, iPad, or iPod touch: Press and hold both the Home and the Top (or Side) buttons for at least 10 seconds, until you see the Apple logo.