Depends on what you're tampering with. If you were to try to switch out the processor on a lappy, that'd be voiding the warranty. Stuff like wireless adapter, RAM, Hard Drives are meant to be replaced, and there is no problem whatsoever wtih doing it.
An' most warranties do allow you to tamper with the computer without vioiding the warranty. It's just the extent of the tampering. But there is no company on earth that'll say 'No, you can't upgrade your ram without voiding your warranty.' Well...maybe gateway.