So I have a basic scenario in my mind, and it feels a bit railroady... but I wouldn't mind a few second opinions.
Heroes have been out of town for a long time and return to home base. Oh Noes! Something important has just been stolen! But have no fear, one party member is an excellent tracker.
The thief, fearing pursuit, flees through a dangerous area that she knows very well. As the party tracks the thief, they risk running into traps, dangerous terrains and other such obstacles, diversions, false leads and hostile locals. Eventually they catch up and confront the thief to regain the McGuffin.
While the party can deal with each obstacle/encounter as they wish, and they are free to say "... screw this let her have the McGuffin", it's a very linear structure.
Is this railroading?
Something becomes railroading if there's no choice. A linear story is a railroad because they characters have no options but to follow the path
and their decisions are largely made for them. They have to go from A-to-B-D, even if it makes much more sense to C.
(Theoretically, it would be possible to railroad a non-linear story. By having small, set choices but still no room for variation or deviation. It's just much harder.)
The problem with railroading is really one of player agency. If the players take the hook, follow the linear path, and go all-in with the story... it doesn't matter if it's a railroad. If the mandated decision is one they would have made anyway, so they don't realise they didn't have a choice, it doesn't matter.
In essence, if you never move off the path, it doesn't matter of stepping off the path magically lead you right back onto the path.
A good DM will present the illusion of choice in their railroads, where the players feel like they have the option of saying "no" to the quest and doing their own thing. But won't because that's not where the story is.
And an even better DM will let them make their own choices that lead them to the final destination, letting the party lay their own railway tracks.
As an example, I ran the original Dragonlance modules updated to Pathfinder. The initial bits were good, fun, and interesting. The hooks were obvious and the player's actions were generally logical. While you had a few different options and routes to take, they all led to the same destination where the plot would continue. But the mystery was apparent and the hooks clear, so it didn't matter. And I made sure to plant hooks for future paths, seeding where the party had to go next. They never felt forced because the next course of action made sense.
But in the later modules some things made less sense. There was a lot more curious logical leaps which made it problematic and took the players out of the game. They were doing something stupid, which breaks suspension of disbelief. That's when the railroading became an issue.