Did you build this computer?
If you didnt build this computer then return it under warranty for a replacement. A computer should work with no problems when just purchased and should have a warranty unless this is a new used computer bought off of someone else in which there might not be a warranty and you are then stuck with fixing it or taking a loss.
What Make/Model computer and specs would help?