To some extent it does depend on what processes your company has in place but I will give a few generic guidelines on what happens.
Estimates for testing are usually a subset of estimates for the complete project and may be negotiable with the Project manager.
To develop estimates
- identify the tasks you will be doing
- you may have to guesstimate the expected number of test cases/scenarios - this is done based on experience and historical data. Most estimates are required before you will know this.
- using experience, historical data or a simple set of guidelines identify the estimated hours for each set of tasks.
- the total for these is the estimate
On some projects you are required to re-estimate at different times when you have more knowledge and details of the project.