What you need as an adult
You must be a permanent resident, without a removal order or unfulfilled conditions. You must have been physically in Canada for at least 1,095 days (3 years) in the 5 years before you sign your application, including at least 730 days as a permanent resident; each day as a temporary resident or protected person counts as half a day, up to 365 days.
You may need to have filed income taxes for at least 3 of those 5 years. If you are 18 to 54 when you sign your application, you must show adequate English or French (level 4 of the Canadian Language Benchmarks or NCLC) and pass the citizenship test. You must not be under a prohibition, and you take the oath at the ceremony.
Who takes the test
In most cases, you take it if you are between 18 and 54 on the day you sign your application. You don't if you are under 18 or 55 or older, or if you asked for and received a waiver. IRCC also has accommodations, such as a test on paper, orally or in Braille, in person or on Microsoft Teams.
The fee
IRCC's fee list gives $653 for an adult application, which includes the processing fee and the right of citizenship fee, and $100 for a minor. The test itself has no separate fee. Check the fee list when you apply, as fees change.