You conduct several of these longer flights with your instructor, and when they feel you’ve gotten the hang of it, they let you do a few alone.
For the purposes of flight training, a “cross-country flight” is one to an airport more than 50 miles away. You conduct several of these longer flights with your instructor, and when they feel you’ve gotten the hang of it, they let you do a few alone.