I am a legal alien allowed to work in USA. I recently opened a checking account in Bank of America and deposited some money (dollars) in the bank. I wish to know how I can access my account to withdraw the money or deposit some money back home in my country where dollar is not a currency.
Generally when you open a new account, you'd be given a checkbook (usually "starter" checks with no personal information, but some banks will later mail you a proper checkbook with your personal details) and a debit card (again, some banks will give you a "starter" one on the spot with a personalized following up in the mail, others will mail you).
With the debit card you can use your bank's ATM to withdraw cash from your account, or use it for purchases (will debit, as the name says, directly from your account). You can also use it in other ATMs, but that will usually be with significant fees ($2-$5 per withdrawal to both the ATM owner and your bank).
Checks - you can write a check to someone or use the check to go to the cashier in the bank and withdraw money (although usually they have special withdrawal slips for that in the branches, so you don't really need to waste your own checks).
As to how to deposit money in your home country - you'll have to check with the bank you have an account at back at home. Usually, you can "wire" transfer money from your BoA account to the account back home, but that is usually comes at a fee of about $30-$50 per transfer (in the US, additional fees may be charged at the receiving end + currency conversion costs). You can also write yourself a check and deposit that check at the home country bank, but that depends on the specific bank whether it is possible, how much it would cost, and how long it would take for them to credit the money to your account after they take your check - may take weeks with personal checks.