If you're getting closer to retirement, you may already have a picture in your mind of what it might look like. That picture could involve you spending your days gardening, reading on the porch, and meeting your grandkids at the bus stop after school. Or it could mean doing a lot of traveling.

To pull off your dream retirement, it's important to get a handle on your finances as well as your expenses. And healthcare is a big expense you'll need to plan for. That's why it's so important to understand how Medicare works.

Once you turn 65, Medicare may be your source of health coverage. But there's a lot of misinformation out there in the context of Medicare. And buying into it could throw your retirement finances out of whack, thereby compromising those visions you can't wait to bring to life. So with that in mind, here are some key things to know about Medicare well before you make your retirement official.

A person at a laptop.

Image source: Getty Images.

1. There are costs involved

One of the biggest Medicare misconceptions out there is that the program is free to enroll in, and that there are no out-of-pocket costs associated with receiving care under Medicare. But that couldn't be further from the truth.

Medicare Part A, which covers hospital visits, generally is free for enrollees in that they don't pay a premium for coverage. But there's a (large) deductible you'll have to meet per hospital stay you require.

Meanwhile, Medicare Parts B and D, which cover outpatient care and prescription drugs, respectively, do charge premiums. And on top of that, there's coinsurance and co-pays to budget for. Make sure to read up the costs associated with Medicare so you can plan accurately.

2. It won't pay for everything

There are certain health-related services you might need access to as a senior, like dental visits and eye exams. But Medicare won't pay for those. It also won't pay for hearing aids and other specific types of care.

It's important to understand what Medicare will and won't pay for ahead of retirement so that you can either pad your savings or adjust your budget accordingly. That said, some of the services not covered by original Medicare may be covered by a Medicare Advantage plan, which is an alternative to traditional Medicare. However, there are pros as well as cons to signing up for Medicare Advantage, so don't automatically assume it's a good solution for you.

3. You can enroll without being on Social Security

As mentioned, Medicare eligibility begins at age 65. But you don't have to be on Social Security to enroll in Medicare.

In fact, it can be beneficial to first sign up for Medicare at 65 and wait a little longer for Social Security. Full retirement age for Social Security doesn't kick in until 66, 67, or somewhere in between, and that's when you're first entitled to your complete monthly benefit based on your personal income history. If you sign up for Social Security before enrolling in Medicare, it means you're effectively reducing your benefits for life.

Now to be clear, that option does exist, since you can sign up for Social Security once you turn 62. But you should know that while your Medicare Part B premiums will be paid out of your Social Security benefits if you're collecting them at the time of your enrollment, you don't have to be receiving Social Security to sign up for Medicare.

There's lots to know about Medicare, and some of the things you see might be confusing. So take the time to educate yourself over a series of weeks or months. You don't have to cram all of that information into a single sitting. But it's really important to understand what Medicare costs and covers, and how it works in conjunction with Social Security, before your retirement kicks off.