Start by day hikes where you can frequently exit. For example, find a day hike where after 2 hours, one has the option either to cut it short to a 2½ hour hike in total, or to extend it to 4 hours, and after 4 hours, one has again the option to cut it to 4½ hours, or to make it 6 hours.
If you've done this for several days and find out that 6 hour day hikes are fine for you, you can start doing hikes reaching more remote places where you don't have such an "exit strategy". Make such hikes for several days.
If this goes fine too, you can start planning multi-day hikes. Again, start easily: do hikes where you have an exit strategy. Hike from cabin to cabin (easy in much of Europe, harder in N-America; don't know about other places), where one can decide each day to stop the next day, or to continue for at least one more day.
In summary, when unexperienced, I recommend to build flexibility into your planning. Some unexperienced hikers have no problem hiking a week on stretch. Others find within 2 hours that they have had enough for the day. The only way to find out is to try it out; take it easy, and have an exit strategy.