How is capital gains tax paid?

So if I sell my home this year, I realize I'll have to pay the capital gains tax for the tax year I sold it (2017), but when do I actually pay the tax, how do I pay it, and where is it reflected?  

Do I just do my taxes next year for 2017 and write a huge check to Uncle Sam once it's figured out doing my taxes?  I'm just trying to figure out how it is paid to the IRS.