The amount stated is the total amount of money the customer will be paying to the company. How much profit that will translate into is dependent on the type of contract.
Some types of contracts:
Cost plus fixed fee: they are paid what it costs to complete the contract plus a fee on top of that. That fee represents their profits. The costs will include salary, benefits, overhead, equipment, supplies.
Firm fixed price: They perform the service, and they get paid a fixed amount. If their costs are higher than they forecast, then they may lose money. If they can be more efficient than they forecast, then they make more money.
Time and materials: They are paid for completing each sub-task based on the number of hours it takes to complete each sub task, plus materials. This is used to hire a company to maintain a fleet of trucks. If the trucks are used a lot they will need more standard maintenance, plus additional repairs based on the type of use. They pay X for labor and Y for materials for an oil change, but A for labor and B for materials for a complete engine rebuild.
There are many variations on these themes. Some put the risk on the customer, some on the company.
How and when the company is paid is based on the terms of the contract. Some pay X% a month, others pay based on meeting milestones. Some pay based on the number of tasks completed in each time period.
Some contracts run for a specific period of time, others have an initial period plus option years. The article may or may not specify if the quoted amount is the minimum amount of the contract or the maximum amount.
The impact on the stock price is much more complex. Much more needs to be known about the structure of the contract, and who will be providing the service to determine if there will be profits. Some companies will bid to lose money, if it will serve as a bridge to another contract or to fill a gap that will allow them to delay layoffs.