It's important to draw a distinction between useless and valueless. Music and art could be called "useless" in that they have no practical applications to the real world, but our lives are immensely better because of them: most people would be unwilling to give them up.
A similar case can be made for modern research, especially in fields like pure mathematics, pure science, and philosophy. These fields have few (if any) practical applications to the real world, but it is absurd to say that they have no value: whether or not they are "useless", our lives are vastly greater because of them. If humanity focused solely on practical problems (e.g. building stronger bridges, finding more efficient ways to purify water, creating faster computer processors), I would be forced to ask "What's the point? Shouldn't we just try to enjoy our lives? To truly live?" For many people, solving practical problems doesn't bring joy and meaning into their lives; value comes from passion, spirituality, relationships, and understanding of one's place in the world. The world where people solely focus on practical applications isn't a world fit for humans, because it's art, music, philosophy, pure science, that tell us how we should live our lives, what our role is in this universe, and what it means to be human.
So, in response to your question "how is philosophy useful?" I would say that as far as I know philosophy has at best few practical applications. But, in response to your other question, "Is philosophy really necessary?", I declare absolutely.