Start by doing some basic research (uspto.gov, if in the U.S.) and then hire an attorney.
You cannot patent an
idea, but you can patent an
invention. Your app might be an invention, and thus might be patentable. Getting a patent is a complex, slow, and expensive process, however. It's not something you do yourself. You can get some quick protection with a provisional patent, but it still will require much time, money, and effort later-on. And you still need an attorney.
You should protect yourself with a well-written developer agreement. You need more than just a Non-Disclosure Agreement (NDA). At minimum, you need to have even any
prospective developer sign an NDA. In fact, anybody that you discuss your idea with.
Once you have chosen a developer, you need a written agreement specifying exactly what the developer is to deliver (e.g. including source source), what rights are conveyed, and what (if any) rights the developer retains.
Once your app has been developed, you should formally register a copyright on the app and it's artwork. This is inexpensive, easy, and you can do it yourself. (But, still, it is useful to at least consult an attorney.)
You may also find that there may be one or more trademarks that you might want to register. For example, your logo, a logo or some distinctive element or design within the app, characters in a game, etc. While not as expensive or as drawn-out a process as getting a patent, it's still not exactly cheap, and really isn't something you should try to do yourself. (For example, there are very specific ways in which you have to describe graphical elements in words. I guarantee, You Do Not Know How To Do This.
)
Aside from all this, developers are expensive, especially in the U.S. and the rest of the developed world. You may be tempted to use the various web sites that can hook you up with developers from around the world. While potentially saving you money, this exposes you to all sorts of risks, including - from a practical standpoint - unenforcability of any agreements you may make.
Frankly, that approach is probably best for expert app developers, who know how to break-down app development into discrete tasks so that they can be partitioned-out to multiple developers each of which are not given the whole picture, and who have a pool of developers of known skill and a track record that they can use. This manages risk of both misappropriation and of non-performance.