Visit visa

Hello everyone
I really need your advice in this..If someone from Germany invites you and states you will be staying with her for 1 month.. can you stay there for 3 months until your visa expires or it's just the 1 month which she recorded?
Because someone says there is a difference between duration of stay and validity of the visa.

You can stay in Germany as long as your visa is valid.
If you are from a country whose citizens need a German sponsor (i.e. a person who agrees to bear all costs of your stay and return) to get a visa, then this visa will be valid only until the end of the sponsor's coverage.

Thanks beppi for that..I come from Kenya and I don't need the sponsor but the person inviting me was just confused about that.

In that case you apply for the visa independent of the person inviting you. Then you can stay in Germany (anywhere you like, including his/her home) for as long as the visa is valid.