Sometimes in some time ago (usually
millions of years), a dead body like a tree would be buried and decomposed
leaving behind a cast (hole shaped like a body of a tree) for minerals
like agate to fill in.
All of this is just one piece in two points of view.
Location unknown (Information please!!!)