There are many ways. The first is to build a good walking base. You must walk before you run!
Getting properly fitted for running shoes has helped a great many people, myself included. Head to a specialty running store and get a proper fitting! It's worth the investment, and usually isn't as much as you think.
Then, pick up a training program. There are many apps (I love the Zombies, Run! 5k training app: https://www.zombiesrungame.com/
- worth every penny.) Or you can use the Sparkpeople 5k your way training plans: www.sparkpeople.com/myspark/training-plans
These are great because they also include the walking plans, a good way to build up to something more achievable first.
There are also many such plans around.