데 is an 의존 명사 (dependent noun) listed as follows in the dictionary.
1. "곳"이나 "장소"의 뜻을 나타내는 말. (place, location)
2. "일"이나 "것"의 뜻을 나타내는 말. (matter, thing)
3. "경우"의 뜻을 나타내는 말. (occasion)
It is similar in meaning and grammatical function to 것. 것 has the sense of "a thing", "action", or "fact", while 데 means something broader and bigger, like "a place", "purpose", "occasion", etc. Often times, you can substitute 것 (or 일) for 데 without changing the meaning much.
- 이야기하는 데에 열중해서 설명을 못 들었어요.
== 이야기하는 것에 열중해서 설명을 못 들었어요.
=> I was too wrapped up in talking to hear the explanation.
- 영화 보는 데 물두해서 전화 소리도 못 들었다.
== 영화 보는 것에[일에] 물두해서 전화 소리도 못 들었다.
=> I was so immersed in the movie I didn't hear the phone ring.
전 술은 잘 마시는 데 반해 담배는 전혀 못합니다.
== 전 술은 잘 마시는 것에 반해 담배는 전혀 못합니다.
=> While I drink my share, I do not smoke at all.
저는 책을 사는 데 인터넷을 이용해요.
== 저는 책을 사는 일에 인터넷을 이용해요.
=> I use the Internet to buy books.
그분은 암을 치료하는 약을 개발하는 데에 일생을 바친 분입니다.
== 그분은 암을 치료하는 약을 개발하는 일에 일생을 바친 분입니다. (OK)
-> He dedicated his life to the development of a medicine to cure cancer.
(In all the above examples, 데 sounds much better than the substituted expression).