A foreign key must refer to a unique key, whether primary or not. In your current supplied DDL, Autocare unique identifier (primary key) is a combination of IDAutocar and IDTipAutocar . On the other hand, you have a Curse link Autocare.IDAutocar , which is not unique.
You can add IDTipAutocar to Curse (and the definition of its foreign key):
CREATE TABLE [dbo].[Curse] ( [IDCursa] NUMERIC (18, 0) NOT NULL PRIMARY KEY, [IDTraseu] NUMERIC (18, 0) NOT NULL, [Data] TIMESTAMP NOT NULL, [IDCompanie] NUMERIC (18, 0) NOT NULL, [NrLocuri] NUMERIC (18, 0) NOT NULL, [IDAutocar] NUMERIC (18, 0) NOT NULL, [IDTipAutocar] NUMERIC (18, 0) NOT NULL, CONSTRAINT [FK_Curse_Trasee] FOREIGN KEY ([IDTraseu]) REFERENCES [Trasee]([IDTraseu]), CONSTRAINT [FK_Curse_Companii] FOREIGN KEY ([IDCompanie]) REFERENCES [Companii]([IDCompanie]), CONSTRAINT [FK_Curse_Autocare] FOREIGN KEY ([IDAutocar], [IDTipAutocar]) REFERENCES [Autocare]([IDAutocar], [IDTipAutocar]) )
Alternatively, you can remove the IDTipAutocar from the Autocare primary key definition:
CREATE TABLE [dbo].[Autocare] ( [IDAutocar] NUMERIC (18, 0) NOT NULL, [IDTipAutocar] NUMERIC (18, 0) NOT NULL, PRIMARY KEY CLUSTERED ([IDAutocar] ASC), CONSTRAINT [FK_Autogari_TipAutocar] FOREIGN KEY ([IDTipAutocar]) REFERENCES [dbo].[TipAutocar] ([IDTipAutocar]) );
What ever makes more sense in terms of your business logic.