The process requires two main steps — unenrolling your device from the macOS beta program and reinstalling the macOS you want.
To unenroll from the beta program, go to System Preferences… > Software Update. Click on Details… under This Mac is enrolled in the Apple Beta Software Program and confirm by clicking Restore Defaults in the pop-up window.
Next, reinstall the macOS you want as outlined above.