It depends on the skill level. Some people can master basic cooking techniques in a matter days. Others might need months or even years to master basic cooking techniques.
The time taken to learn to cook will depend on who you ask. A person who has never cooked before will likely need more time to learn than someone who is a regular cook. Also, certain types of cooking require more experience than others. For instance, baking requires more knowledge than frying.
You should learn a particular technique to improve your cooking speed. After mastering one technique, you can move on to the next. You don't need to worry about how many days or weeks it took to learn how to cook. Keep practicing and having fun with the whole process.