EXTENTION FEDERAL and STATE

Hi to all.

My question is if I want to take an extension for FEDERAL and STATE should file my tax return or just pay whatever I owe to them? And what is the process?