Most Legendaries require an achivement or status of some sort, such as owning a Mystery Gift item such as the Liberty Pass, or doing something in-game to be able to fight the Legendary, such as have beaten the Elite Four, or beaten a Gym or something. Once those requirements (if any) are done, often the is a maze or area you must conquer. Once done, then press A to interact with the Legendary and begin battle. Sometimes Legendaries are not the interactable kind; such as Roaming Pokemon like Latios/Latias or Mesprit.
If you mean 'If I have finished all the challenges before meeting the Legendary, do I have to do something before pressing A (interacting)?', then no, once you have finished all of the required, nothing else is required, although in some cases there must be something in the background happening, e.g. the Snorlax blocking Diglett's Cave in HGSS can only be interacted with if the Pokegear is playing the PokeFlute station on the radio, though Snorlax of course, isn't a Legendary.