Using a paperclip (or piece of wire) to bridge two pins on the cars diagnostic socket. The engine management light will now flash out any stored trouble codes.
The specific method depends on the make/year/model of car.
If you need further info start a new post with your car details in the header, eg.
paperclip test 1998 vectra 2.0 petrol
A description of the running problems etc. would help too.
fed, May 2009