To be specific, taxing [use of and/or extraction of] fossil fuels. The reasoning is that extracting and using fossil fuels adds carbon to our environment that was previously sequestered within the earth. The goal is to economically encourage the development, production, and use of non-carbon-extraction-reliant technologies that compete with carbon-extraction-reliant technologies.
Yes, it is hard to implement and would be wildly unpopular hence why it won’t happen
> What would actually happen
There’s no point discussing hypothetical issues with hypothetical legislation. What kind of loopholes or corruption can exist is entirely dependent on the legislation itself.