It's not easy, nor easy to explain. I suggest you start doing some reading on the subject.
First, you must understand
Object Oriented Programming[
^]. Make sure you get
Encapsulation[
^],
Inheritance[
^] and
Polymorphism[
^]. They are the 'three pillars of OOP'.
After that you are far from there yet. The
SOLID principles[
^] are key to building robust and re-usable software.
When you get all of these principles you may start reading up on
Design Patterns[
^].
All these will help you in building
Multitier architected[
^] software.
Basically, when it comes down to three tiers you have three layers of classes. A data layer, which will interact with your data store. Usually these are some classes that insert, delete, update and get data from a database. Many people use an
Object Relational Mapper (ORM)[
^] for this. In .NET
Entity Framework[
^] and
NHibernate[
^] come to mind.
The 'middle-tier' contains business logic. Here you perform actions on your business object, like calculating the total price of a sales order or an invoice. This tier interacts with your data layer, but not with your data store itself.
Finally there is the UI layer, which is where you present your data to users and allow users to interact with the business layer. An example of a UI layer can be WinForms, HTML and CSS or WPF front ends.
Google has lots of images representing what I just said,
take a look[
^].
Hope it helps! Good luck! :)