I am curious to know what happens to ADA when it gets locked to a script as far as staking goes. In other words, can ADA locked at a script address by staked?
When you create an output with a script address, you can put whatever staking key you like on it. That staking key behaves exactly like staking keys do in all other outputs. Scripts can see staking keys associated with outputs, so if you want to make an assertion about what staking key is used on an output, you can do that.
So yes, if you have an ongoing state machine you can assert that the funds are always staked with a particular key.
In addition, you can also have a script control the delegation rights itself. Each address has a payment credential (key or script hash), and can also have a stake credential (key or script hash — or a reference to a stake address registration certificate, which will yield you a key or script hash, but is more compact in the UTxO).
An Ada address is made up of 2 separate credentials, one for payment and one for staking. These are both treated independently and one, the other or both can be script hashes instead of plain key based addresses. This means the user putting funds in a smart contract can keep those funds associated with their stake address until the script is spent (at which time the person redeeming the script gets to choose what stake credential is used).