Does Linux use original Unix code or do they share the idea?
In cases like this it helps to define Unix more precisely. In this response I will be talking about AT&Ts unix specifically.
Linux is a Unix Clone and shares no actual code. This is what allowed Linux to be licensed under the GPL and hence free software. If it had inherited code, it would have been owned by the creator of the code it used and could not have been freely modified and used under the GPL as it is today.
If is very likely that it would have enjoyed much more limited success had it not been so widely accessible. There are several competing free software unixes such as FreeBSD which came later and do infact share code though with a very different licensing scheme. There is far too much to the licensing history to properly cover it here unfortunately.
Linux kernel is largely considered based on the original Unix kernel. Linus Torvalds wrote most of the Linux kernel code from scratch. See this page for more information: https://www.kernel.org/linux.html
PS: It is not at all a stupid question to ask in my opinion.
Linux doesn't use any of the original code. The original Unix code from AT&T was sometimes available free of charge to certain groups but was never free to redistribute.
Most commercial Unix systems obtained a license from AT&T and made and sold their own modifications to the AT&T code base.
In the 1980s, a group at Berkeley University made their own distribution of additional Unix software, which was freely redistributable and modifiable. Gradually they rewrote components of Unix until in the early 1990s they had their own Unix variant, unencumbered by AT&T proprietary code. This was known as the Berkeley Software Distribution (BSD), of which there are now several variants (FreeBSD, OpenBSD and NetBSD being the main 3; Mac OS X is partly based on FreeBSD).
In roughly the same time frame, the GNU project developed their own freely redistributable and modifiable replacements for some Unix utilities. When Linux started, the GNU project lacked a kernel; quickly the combination of a Linux kernel, GNU utilities and other utilities spread. This combination is known as Linux distributions, or Linux for short. Linux doesn't contain any of the original Unix code; like BSD, it is an independent reimplementation of the same design.
Other independent reimplementations of Unix include the now-dead OSF/1 as well as the MINIX variant used in teaching and on embedded devices.