Uav autonomous navigation

I’m new in UAVs and generally in robotics and I have a query.
How is it possible to navigate a UAV? More specifiacally, should i use predefined points with coordinates or can i import a motion planning algorithm (e.g PRM) in real-time flight and how?