This depends on the insurance cover that you have in place at the time that you drive the vehicle. If you are driving on a Driving Any Car cover that is associated with your own fully comprehensive insurance policy, you will be covered on a Third Party Only basis. This means that the third party will be able to recover their costs, but you will be liable to pay all costs associated with the repair or replacement of the vehicle that you were driving at the time of the accident.
If you are a named driver on someone else's insurance policy, you will benefit from the same level of cover that they enjoy. It will, however, be their no-claims bonus that will be affected if they need to claim on the insurance to repair their own or the third party's vehicle.
If you have taken out a temporary insurance policy or an additional car insurance policy, the cover will be as you have agreed and any impact on the no-claims bonus will be your own.
As a side note, it is likely that if you are found to be at fault in an accident in someone else's car, they are unlikely to let you drive it again, so it is always best to respect the privilege and drive someone else's car very carefully!