Coding with the goal of letting the computer understand (junior/medior) versus coding with the goal of letting other developers understand (senior).
Getting code to work now (junior) versus keeping code working in the future (senior). Future-proof code is expandable.
The simpler the code, the closer a developer is to senior level. Keep It Stupid Simple (KISS).
Tell the difference by reading someone's code. Can you understand how the code works by only reading it, or do you need to run (parts of) it? Can you update a feature with as little change as possible? Is it easy to add new features without rewriting (too much) existing code?
A senior developer has more accumulated knowledge than a medior/junior. More years of experience automatically means more knowledge, just because you came across more scenarios. More interesting though is what someone does with this knowledge. Both in applying it to code and in mentoring junior/medior developers.
Tell the difference by asking about the projects someone was involved in. What was their role in the project? How did they work? What was their involvement in designing the system? What were the challenges they had and how did they solve them? Generally, the higher the number of projects someone has gone through, the closer someone is to senior level.
Senior developers design the architecture for a new feature, junior/medior developers implement it.
The amount of questions a developer asks says nothing about his level. The way a developer formulates questions (from generic to specific) does. A junior developer asks generic questions (lack of knowledge) where a senior developer asks specific questions.
Junior/medior developers have mentors, senior developers are mentors.