LOL, before I lead anyone on, at this moment I am working on my third knitting project. I'm just a beginner myself. I have done a lot of reading and the most important part of knitting to get the right size (from a specific pattern) is all about GUAGE!!! So I would say "no" you do not specifically need the same weight of yarn and size of needles, but you do need the right guage. With the yarn fabric I would recommend a word of caution: Using cotton instead of a wool/nylon blend called for in the pattern, may not be a good substitution.
If you're not working from a specific project then I'm assuming you're working on your own design. That's unknown territory to me. I would guess that it would be easier to make your own designs after you have acquired some experience and extensive research into knitting though.
Hope this helps.