Often when the computer first starts to boot it shows the devices connected to it, and if it shows the DVD drive then it is connected correctly. If you can't see it then you need to enter the BIOS, normally by hitting the DEL key or F2 key when you switch on the computer (check with your manual) If you still can't see the DVD in the BIOS then either the drive is faulty or you have a bad connection to the drive. If this is the case the DVD drive is fixed in by a single screw on the back of the laptop that will when removed enable you to slide out and refit the DVD drive.
If the drive is detected in the BIOS then you may have a software problem. On Windows7 run the Hardware and Devices troubleshooter.