Someone wants to give me a check over the internet to deposit into my account. If I have a checking and savings account, can they access both? or can they just get to one account?
There are a few ways this could be used in a scam:
You deposit the check and they want some of the money back, then the check bounces sometime later and you are on the hook for the money. This is an advance fee scam.
If they want any of your credentials (login/PW/Security info) for your account, then they want to use it to steal your identity, money or both.
The deposit of the check, when the cancelled check or an image of it (quite likely rejected for insufficient funds eventually) is provided to the bank of the person sending the check, provides the scammer with your routing number and account number.
This information, in turn, can be used to make a counterfeit check or an equivalent fraudulent electronic transfer via an ACH payment, usually without a login, password or security information.
This is a way you can be defrauded in this scheme in addition to the two other methods identified by @JohnFx in his answer, and is not exhaustive.
Yet another possibility would be to use knowledge of the routing number and account number for one account, together with additional information that can be obtained, for example, through Facebook surveys and comments and from public records and credit reports obtained illicitly, to leverage that information into obtaining a new login and/or password from the IT people for the bank to gain access to your other accounts.
Of course, the fraudsters can skip all of that work if they get your username and password. At that point, relief from the bank from fraudulent activity is much more difficult to secure, all of your accounts are exposed, and since most people are not very original in establishing different passwords for every account, the odds that other accounts will be compromised as well surges.
Once your Social Security number and security question answers are obtained by gaining access to your online account, their ability to penetrate other accounts that you may have with other institutions is greatly increased.
Frequently the perpetrators are in locations that are effectively beyond the jurisdiction of U.S. and/or E.U. authorities, so, your prospects for after the fact relief can be bleak.
As correctly noted in the comments:
THIS IS FRAUD. DO NOT COMMUNICATE WITH THIS PERSON AGAIN
They have done this hundreds of times and know ways to defraud you that you haven't imagined.