usually on a grant application or clinical trial, there is a PI (principal investigator) and then a few co-investigators. to be a co-investigator, you have to be involved in the project in some measure, and it has to be outlined as such when you submit the grant/trial so its official.
ive done both as a resident, where is am a co-investigator, so that i may get 'credit' for my work (writing up the proposals/coming up with the ideas) even after i finish my residency (years down the road in some cases)...this credit is usually in the form of publications...