Your question was a little confusing. Are you saying that the laptop speakers only work when you plug in a set of headphones or external speakers?
Do the headphones or external speakers also work when you do this?
Was something incorrectly plugged into the headphone jack at some time in the recent past?
Derek's answer might work. You could also try a can of compressed air and blowing into the headphone jack.