I want to know how a circular camera lens captures a rectangular picture. Moreover what will happen if the lens was rectangular. I have tried a lot to think about it but i could not figure out anything.
In short, cameras produce rectangular pictures because the sensor is rectangular; the illuminated area is circular and some light is wasted off the edges of the sensor. In film cameras the sensor is the film, which is stored in a roll as tape, and making the frames bigger so they catch all the light would waste film. In digital cameras you could make a round sensor if you so desired, but the language of rectangular images is so deeply entrenched that no one does this.
Quite an interesting question... The important thing to understand is that the lens doesn't actually determine the shape of the picture that is produced. With any camera the lens only bends and focuses light onto a screen, which for olden day cameras are objects like films. The shape of the film actually determines the shape of the picture.
The lens in a camera is very similar to the human eye. The eye is circular and yet you don't see everything in a circular picture. Lenses can be different shapes like rectangles (as you mentioned) but these shapes are not as good at focusing light. This is why the eye, magnifying glasses and various other objects are round rather than square or rectangular