There are a lot of things that can affect how quickly or slowly denim softens over time. It depends on the type of denim, how it was manufactured, how it was treated before you bought it, how you wash it, and how you wear it.
Generally speaking, denim does tend to soften over time. This is especially true if it's a lower quality denim or if it's been pre-washed (a process where the denim is washed before it's sold to you to help soften it and give it a more comfortable feel).
If you want to speed up the softening process, you can try washing your denim in hot water or soaking it in fabric softener for a few minutes before washing. You can also try wearing your denim as often as possible - the more you wear it, the softer it will become.
Of course, if you don't want your denim to soften, you can always just avoid washing it and wearing it as much as possible. Eventually, it will reach a point where it's too stiff and uncomfortable to wear, but that could take years.