What is Tony from the shining?In the book, Tony is the man Danny would eventually grow up to be, sending messages back from the future to help guide his younger self.
In the film, Tony is simply an imaginary friend; as Danny himself describes him, "the little boy who lives inside my mouth." According to Kubrick
Danny has had a frightening and disturbing childhood. Brutalized by his father and haunted by his paranormal visions, he has had to find some psychological mechanism within himself to manage these powerful and dangerous forces. To do this, he creates his imaginary friend, Tony, through whom Danny can rationalize his visions and survive (quoted here)
Source: The Shining (1980) - FAQ
Your next question may be what are those visions. But the best you can probably hope for in that respect is speculation.
There are many theories, but Kubrick himself has gone on record to state that The Shining is a simple ghost story, and that ghost stories are all about the irrational and inexplicable.
A story of the supernatural cannot be taken apart and analysed too closely. The ultimate test of its rationale is whether it is good enough to raise the hairs on the back of your neck. If you submit it to a completely logical and detailed analysis it will eventually appear absurd.
Source: Kubrick speaks in regard to 'The Shining'
Not everything in movies is necessarily explainable, in that there are some things that even if you asked the filmmakers, they wouldn't have a 'rational' explanation for.
A good example is asking "what is the force", from Star Wars. There is no real 'rational' explanation for that, because it's not a rational thing. It would be a bit like asking "what is evil".
Well, evidently "Tony" is Danny's imaginary friend as stated in the book/movie (that lives in Danny's mouth), but was apparently constructed from Danny's subconscious mind as a personality split as a result of his abuse by the hands of his father, Jack Torrence. Whenever Danny is stressed or frightened, Tony shows up to provide guidance and warn him of dangers (Redrum... murdeR).