Obviously, the answer to this question has almost 100% to do with the nature of the problem with the computer, something you probably don't know yet since it hasn't been looked at.
In general, however, the majority of computer problems are fixable, meaning a new part and some repair time is more likely the outcome than needing a brand new computer. Also, as I mentioned in my answer to the last question, it's relatively rare for a computer problem to impact your files.
All that said, and even though you may not know the cause of the problem with your computer, there are usually some clues as to how bad the problem is and what might be the solution when it's all said and done.
If you have any kind of computer but it's turning on and Windows at least tries to start, there's a decent chance that this is a software problem, not a hardware problem. Software problems are easier to solve and usually just involve some time with a computer repair tech.
If you have a laptop or tablet computer that doesn't come on all the way, or at all, you might get lucky and just need a new battery or power adapter. If that doesn't do it, you may be dealing with another type of hardware problem, meaning you may need a new computer. Unfortunately, these types of computers don't have a lot of replaceable parts.
If you have a desktop computer that won't turn on at all, some of the hardware may be to blame but chances are that the individual piece of hardware can be replaced, fixing the problem.