Note: This FAQ is for the mydlink app, not mydlink Lite. The screen shots are from the Android version v1.7.1 (build 133). The iOS version may look a little different.
When you first install your camera, motion detection as well as the automation rule (record and notification) is automatically setup. To enable/edit motion detection, follow the steps below:
Step 1: Launch the mydlink app.
Step 2: Tap Devices at the bottom of the home screen or tap the menu in the upper left corner, tap Devices. You can also tap the camera in your shortcuts and tap the live video to access the camera settings (skip to step 5).

Step 3: Tap Camera.

Step 4: Select the camera from the dial and then tap the gear icon

Step 5: Tap Motion Setting.

Step 6: Tap where you want to detect motion (represented by a orange square). Then select the sensitivity (0-100, 100 being the most sensitive). Once finished, tap < (iOS) or tap the back button (Android) to save your settings.

Step 7: Your settings will be saved.
Note: To turn "off" motion detection, tap the Clear All button, and then change the sensitivity to 0. Tap back to save your settings.
Related FAQs for mydlink cameras that support cloud recording:
How to enable Cloud Recording
How to view recorded video
How to set up automations