Difference between keywords android and r in android studio

what is the meaning of keyword “android” and “R” which are frequently used during development.where and how are they used.

R means referring to resources whether it be predefined resources or defined by you.
resources include id’s, colors, dimen’s, layouts, etc.

android is most commonly used in resources.
In XML, xmlns declares a Namespace. In fact, when you do:

Instead of calling "android:id", the XML will use http://schemas.android.com/apk/res/android:id to be unique. Generally, this page doesn't exist (it's a URI, not a URL), but sometimes it is a URL that explains the used namespace.

The namespace has pretty much the same uses as the package name in a Java application.