In Salesforce, an sObject is a database table that stores your data. Whether it is a Standard object provided by Salesforce or a Custom object you built, they all follow the same underlying architecture.
Pre-built objects like Account, Contact and Lead. These come out-of-the-box with standard business logic.
Example: AccountObjects you create to store information unique to your business. Identified by the __c suffix in the API name.
Example: Project__cIn Apex, you can use the generic sObject type to represent any record, providing massive flexibility in your code.
Metadata (The Schema)
This is the structure of your object—the fields, the data types, and the relationships.
Data (The Record)
This is the actual information stored within that structure (e.g., "Grand Hotels" as an Account Name).
Any object that can be stored on the Lightning Platform is termed as a Salesforce Object or sObject. In Apex, this acts as the base class for all standard and custom records.
You can use the sObject keyword to create an instance of any object. Use the new keyword for instantiation and the dot operator to access fields.
sObject genericRec = new Account();
genericRec.put('Name', 'Data Fortress Inc');
// Concrete Access via Dot Operator
Account myAcc = new Account();
myAcc.Name = 'Ram Prasad';
Generic sObjects can be cast back into their specific concrete types to regain full field access.
Custom Labels cannot be instantiated and are not standard sObjects.
They are accessed directly via the System class (e.g., System.Label.LabelName).