When I hear of persistence, my mind goes to the story of Thomas Edison. Thomas Edison was an American inventor and business man who produced the first commercially viable electric bulb. He had thousands of failed attempts before he succeeded. That's enough for me not to even go near any thing scientific or electrical again, but he still persevered.
Persistence is consciously continuing a task or action in spite of difficulties or discouragement. Doing something continuously for a longtime doesn't necessarily constitute persistence. There has to be challenges for there to be persistence. It's just like how you can't be courageous if there's nothing to fear, you can't be persistent if what you are doing is fun or easy. Persistence involve overcoming obstacles and disappointments.
Genius is 1% inspiration and 99% perspiration. By continuously doing a task, success can be achieved. If you have a goal, working towards it with all you have and not giving up will give you success. There might be a lot of heartbreaks and challenges on the road, but it's up to you to decide whether a successful outcome is worth all the trouble. Don't look at the current difficulties, your eye should be on your goal and what you hope to achieve.
Some goals are unattainable and a takes great wisdom to know that it is time to quit and move on. Doing a tasks with no achievable end goal isn't persistence. You are just wasting your time. If you feel you are competent, it's easier to believe that you are capable of succeeding at your goal so you won't quit. Having something to prove to others is a great motivator for people to be persistent. The fact that you don't want to be perceived as a failure pushes you to do everything possible to succeed.
You can build persistence slowly. Begin by starting small tasks and finishing them before schedule. Don't let negative thoughts distract you from finishing a task. Make a conscious effort to push through any thoughts about stopping a task. Persistence is heritable so if you didn't get it from your parents, try to at least give it to your children.