Why my plot function doesn't work?

When plotting, I get the following errors:

What is happening?

What does ?x show? What other definitions have you made?

This seems likely to be a bug, but I expect you would have to report enough details to WRI (through the Help > Give Feedback menu command) for their developers to be able to figure it out. For me the code plots a line, as expected.

If you can’t figure out how the trouble was created, then restarting the kernel (use Quit[] for instance) should reset the system.

Seems like something has already been attached with the definition of x. Quick fix would be first to clear x then plot like:

Clear[x]

Plot[x,{x,0,6}]

I hope this solves your problem.