1. Does it live in the land or in the sea?

2. Does it live on land or in the sea?

(Are both the same in meaning?)

In the land = down in the dirt??

The second sentence is far better!

yes

Yes, both sentences have the same meaning. They are both asking about the habitat of the subject in question, whether it lives on land or in the sea. The only difference is the word order - in the first sentence, the word "it" comes before the verb "live," while in the second sentence, the word "it" comes after the verb "live."