the kit they give you for the test is a PAP (positive air pressure) device. You will need to wear a mask and the device will blow air through the mask to keep your airways open. There are other things you have to attach to yourself as well, if memory serves (It's 10 years since I had the test done).
For the test, the device will blow air through the mask at different pressures and monitor the effectiveness of the differing pressures. the hospital analyse the results and, if it is appropriate, will give you a different one to take home with the pressure set for you.
Now for the fun bit :) I tend to sleep on my side, which dislodged the mask a bit, so the air came out of the side of the mask making enough noise to wake my wife, who promptly woke me to fix the mask back in place. With sleep apnoea is your body wakes you up a bit because it is short of oxygen when you go into the deep sleep needed for proper rest.
With my wife waking me to fix the mask several times each night, the device didn't help me much, and it didn't help her sleep either. In the end, after trying a number of different masks, and having the test redone, I gave up on the thing altogether.
Everyone is different though, and the CPAP device does actually work very well for most patients, if they can get on with it.
Losing weight will certainly help you sleep better, it did with me. And because mine was mildly obstructive, a referral to the dental clinic which made a brace (to move my lower jaw forward a bit) which I wear at night, along with the weight loss, has solved the problem for me.
sqad will probably be along sometime to correct me, but I think slim people can get it as well, though being overweight, taking sleeping pills, smoking and drinking alcohol before going to bed are listed among the more common causes at
http://www.nhs.uk/conditions/Sleep-apnoea/Pages/Introduction.aspx - it's worth checking that site for yourself.