The simplest thing would be a loose or out of alignment wheel. Check that the wheel is tight, and check that the wheel is centered between the fork at the crown. If it is not then the bike will pull to one side or the other.
If the front wheel is centered, then check the rear wheel. If it is loose on one side or otherwise not centered the bike won't track straight. Although this feels a lot different than if the front wheel is out of alignment.
90% of the time this is the problem.