I recently bought a cheap speedlight flash. I've set it to manual mode and when i am using it in a dark place it dosent trigger and sometimes it does. Am i doing something wrong?
The fact that the place is dark should not matter, although it could just help if the flash is controlling an optical slave.
Here are some reasons an external flash can randomly missfire:
Hotshoe bug (external flash on camera)
Check the connection between the camera body and the external flash, screw it tighter. Shoot a photo; if is still doesn't flash, find the test button of your external flash (read the manual), and push it. If it works with the test button, but not when taking a photo, then it's probably a connection problem.
Shooting while reloading
If missfiring happens when shooting a lot of photos in a row, it might simply be that the external flash is not ready yet. There should be a signal for flash readiness (sound, LED, or etc.). Have a look at the manual.
If the flash is an optical slave
If your on-camera flash is used to trigger an external flash remotely, put the camera just in front of the external flash's light sensor and take a test photo. If it works, maybe adjust the power of the internal flash of your camera, or the orientation of the external flash.