Yes to both questions
Indeed, if played correctly, you have an attack phase every turn, and if you cannot or do not want to declare any attackers, the attack phase would still happen. In practice and in the vast majority of cases, players instead implicitly agree on a shortcut to proceed to the next main phase or to the end of turn.
Note however that if you declare an attack with zero attacking creatures, that attack will not trigger any abilities like "whenever a creature attacks you", or "whenever you attack/are attacked" or anything of the sorts. The phase still happens, but no attack happens, even if you explicitly attack with zero creatures.