Can County LEO's also be Federal LE?

I was recently at a jury trial where [blank] County LEO [blank] is also an employee of the DEA. Since I saw that it is possible, how does it work for County/State police to also be hired on by federal agencies like the FBI, DEA or ATF? Is that like a side job with extra pay? How hard is it to get in?