Fantastic question! Just as people are interested
in understanding the history of their own families
(cousins share one set of grandparents), they are
also fascinated by questions about the deeper
relationships of organisms.
Suppose you're visiting a zoo and had never
seen a Giant Panda before. You might ask,
"What's a Giant Panda?" The zookeeper would
explain, Giant Pandas are an unusual species of
bamboo-eating bears. Immediately you have a much
better idea of what the Giant Panda truly IS--an
unusual bear. Being a bear also means that
millions of years ago Pandas and other bears
shared a common ancestor.
Your question about lizards and dinosaurs is
very similar. In a way, you're asking what IS a
dinosaur, and what other animals are dinosaurs
closely related to?
Paleontologists have determined that
dinosaurs are a group of reptiles (living
reptiles include such special subgroups as
turtles, crocodiles, snakes, "lizards,"
and--believe it or not--birds. Many extinct
reptiles are known only as fossils, for example,
bird-hipped dinosaurs and ichthyosaurs).
Leaving aside the tricky issue that in addition
to being reptiles, birds are also dinosaurs (just
like poodles are dogs and also mammals), the
nearest living relatives of dinosaurs naturally
are another group of reptiles (crocodiles).
Together, crocs + dinosaurs are called
Next we can ask, what's the nearest living
relative of archosaurs? Again, this is another
subgroup of reptiles, namely "lizards" (plus their
limbless cousins, snakes). Collectively
archosaurs + "lizards" + snakes are called diapsid
So....to finally get to your question,
Vairavan, "lizards" and dinosaurs are related
by virtue of sharing a common diapsid ancestor
hundreds of millions of years ago (just as you
are related to your siblings through your most
immediate "ancestor," your parents).
You probably weren't expected such a
complicated answer, but that's what makes science
fun, the unexpected!